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 web viewer, 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 transforming it in a looped script, then populating a text field. That text field could be used in a web viewer 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 web viewer.
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:
- FileMaker.PerformScript() 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
Subscribe to get the latest in your inbox.
Built with you in mind
Speak to one of our expert consultants about making sense of your data today. During
this free consultation, we'll address your questions, learn more about your business, and
make some immediate recommendations.