Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

We recently had a client with a problem exporting data in a server side script. Since server scripts run blindly and we can't debug them, we check FileMaker's logs, enable script error logging and add calls for MBS("Trace") and MBS("Log"; ...) calls to log data to the log file from our MBS FileMaker Plugin.

We quickly noticed that the Export Records script step failed with error 3, which is command unavailable. After that I quickly looked though FileMaker's documentation and identified functions with limited Data API support:

Function Data API Server
Close Data File No Yes
Configure Machine Learning Model No Partial
Copy All Records/Requests No Yes
Copy Record/Request No Yes
Create Data File No Yes
Exit Application No Yes
Export Records No Partial
Get Data File Position No Yes
Get File Exists No Yes
Get File Size No Yes
Import Records No Partial
OnFirstWindowOpen No Yes
OnLastWindowClose Partial Yes
Open Data File No Yes
Print Setup No Partial
Read from Data File No Yes
Save Records as PDF Yes Partial
Set Data File Position No Yes
Show/Hide Toolbars No Yes
Write to Data File No Yes

As you see, there are plenty of functions, which are not supported for Data API, but are for normal server scripting. This table is based on Claris FileMaker 20.3 documentation, so it may be different for your version of FileMaker Server. 

If you like to use a function like Export Records in your script, you may need to use Perform Script on Server to run the script in the server scripting process.

For our client, it looks like this:

DataAPIPSOS.jpg

They use FM Better Forms, where the user clicks a button. This button then performs the script in Data API engine. Since Export Records script step is not available, we have to trigger another script using Perform Script on Server. This script then goes to the right layout and record ID (passed as script parameter). Then the script does the Export script step and signals back the result. 

Over time we hope Claris can support more script steps for Data API as the code should be there. MBS FileMaker Plugin can be used on all three engines on FileMaker Server: Server Scripting, Data API and Web Direct.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.