Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 6063 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

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

Posted

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.

This topic is 6063 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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