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.

Script works in FMP client, fails in IWP

Featured Replies

  • Newbies

I've gotten kicked all over the playground by a script for saving lists in a related table, and I was hoping that one of my fellow readers (I've been an FMForums lurker for a while) might be able to shed some light on my problem.

The problem is that my script -- which works as expected in the FMP application -- fails when run in IWP, despite all of the steps being web-compatible.

The script does three things:

1) Set gCurrentListID to (Username & Date & Time)

2) Create new record in Lists table through relationship (People::gCurrentListID -> Lists::ListID)

3) Iterate through a previously found list of individuals, adding that person's unique ID to the related list (Lists::ListOfIDs = Lists::ListOfIDs & "linebreak" & People::PersonID)

I've written an alternate version that gathers the uniqueIDs in batches of 500 before adding them to the ListOfIDs field (the script would slow to a crawl after 5000 entries) which I've attached as a PNG here.

Nonetheless, both scripts fail online: they both set the value of gCurrentListID correctly, create the new record in the Lists table, yet neither will add any text to ListOfIDs in the related record.

Can anybody spot what I'm doing wrong here?

Picture_29.png

Try substituting some of the fields with $variables where possible. Especially the loop counter and the list builder.

It's only a theory, but I reckon this will reduce the interactivity with the database as the $variables are not defined as fields.

You would only then have 1 write operation at the end of the script.

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.