This is just one simple example. Imagine all the capabilities of the Web being available to you and your team in FileMaker.
Calling a FileMaker script from a WebViewer, including the ability to pass parameters, was possible before FileMaker 19. It required using the “fmp://$/filename.fmp12?script=MyScript¶m=MyParameter” URL syntax. Using the data from FileMaker in the WebViewer was also not trivial – it required scripting to gather the data you needed, often transform it in a looped script, then populate a text field. That text field could be used in a WebViewer calculation as a data source. The whole process wasn’t very intuitive yet FileMaker developers came up with lots of creative ways to build amazing FileMaker applications with a bi-directional sync between FileMaker and a WebViewer.
FileMaker.PerformScript() takes two parameters:
- FileMaker Script Name – a string that contains the name of a FileMaker script (the name is not case-sensitive).
A few things to note:
- The PerformScript() function operates asynchronously meaning it doesn’t wait for the FileMaker script to finish. It also means that the FileMaker script doesn’t return a value to the FileMaker.PerformScript() function that called it.
From a FileMaker Script to a WebViewer
- Object Name is the name of the web viewer object. If the name is not specified, the active web viewer will be used.
A few things to Note:
- In FileMaker WebDirect, the HTML specified for the web viewer must begin with “data:text/html,” to work.
- This script step won’t change which layout object has the focus. To change the focus to the particular web viewer, use the Go to Object script step or specify the Object Name in the script.
The Web’s The Limit