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.

Bulk JSON update to Filemaker Script

Featured Replies

  • Newbies

I need to send a JSON string containing 1000+ objects with data to be replaced into fields in a Filemaker layout.  Currently looping a NodeJS method which is taking a large Node heap allocation, and clearly the ideal way to do this is to send the data for all records in one request and loop through it within Filemaker via a script.

Closest thing I can see in the documentation is - run a script and pass a parameter that is the JSON string.  But what is the size limitation on the parameter?

Anyone actually performed a bulk operation in this manner?

Kirk

Parameters have a size limit.

Maybe you like to check JSON functions in MBS FileMaker Plugin to process them. They are made for high performance.

Especially you can check JSON.Parse to parse once and query often. And of course JSON.Import for automatic import into records, where the plugin would create table and fields and then import data.

11 hours ago, kirkroyster said:

 But what is the size limitation on the parameter?

If the script is performed server-side, then there is a limit of 1 million characters. This is documented at:
https://help.claris.com/en/pro-help/content/running-scripts-on-server.html

I could not find any documented limit for scripts performed locally. I tend to think the only limit is available memory. This is supported by some user reports.

 

 

  • Author
  • Newbies

Exactly what I was looking for.  I can get the job done within 1 million characters (JSON string size in the script parameter).  Sorry that I did not find that myself.  No way I'm going to bring 3rd party plugins into the equation as I'm convinced a Filemaker script can loop through the content of a JSON string and update records accordingly.

If anyone has a good example of a script that parses JSON and loops through with record updates, fantastic.  That's what I'll be building near term.

Data API call that initiates the server side script passing a stringified JSON object array containing the values to update into the existing Filemaker records.

Kirk

 

4 minutes ago, kirkroyster said:

If anyone has a good example of a script that parses JSON and loops through with record updates, fantastic.

I think it depends on how exactly the "update" part is supposed to work. If the script needs to find each record to be updated, this could get awkward.

Filemaker has a built-in mechanism for updating records using the Import Records script step. However, JSON data cannot be imported (at least not directly). 

 

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.