July 3, 201610 yr FM 12 Adv. I'm trying to use a layout trigger on record load. The script goes to related records on another layout to perform some operations and then returns to the layout. So, when I load a record, the script triggers, goes to another layout, returns to the original layout, and the script fires again. An endless loop! Any suggestions on how I can get around this?
July 3, 201610 yr At the beginning of the script, check for $$flag being set to 1; if it is, then set it to 0 and exit script. While on the second layout, set $$flag to 1.
July 3, 201610 yr 38 minutes ago, john9210 said: The script goes to related records on another layout to perform some operations and then returns to the layout. You could add the 'Show in new window' option to the GTRR step and close the window when done.
July 3, 201610 yr Author A solution example is attached. On the Meeting layout a trigger on the Response field runs the script "Count responses". It updates the data in the box under Response Summary. The button beneath the Summary also updates the data. I need to use the button when changing records because the summary data does not automatically update. I would like to run the script when I change records and I thought that attaching a layout trigger on Record load would do the trick. However, this creates a endless loop because the script changes layouts and returns to the original layout firing the script again. I've tried the "Show in new window" and the "$$Flag" suggestions, but neither works. Is what I'm trying to do possible?
July 4, 201610 yr You do not need script triggers or script to count records. You need script trigger to commit record and refresh the screen and you also need 4 Summary Fields. Example.fmp12 Edited July 4, 201610 yr by schamblee
Create an account or sign in to comment