AnsweredAssumed Answered

looping script trigger

Question asked by PJSpark on Jun 19, 2012
Latest reply on Jun 20, 2012 by philmodjunk


looping script trigger


FileMaker Pro



Operating system version

Mac 10.7.6

Description of the issue

I've placed a global field on a layout, and what I want to achieve is that once user is in field, they enter categories, or choose from list, and when they press return, or exit from field it runs a script via "EXIT" script trigger, and the last two steps of the script are to blank this field then put the cursor back in, so user can add more.

The trouble I've run into is that last step "goto field". For some reason, it executes the script again, causing an endless loop of calls to itself. Yet it is only suppose to call when it exits the field, not when entered!

If I remove the last step it works as expected, except you have to click back in to the field. If I remove the trigger and use a button beside the field it works, but of course the user has to press return twice, once to leave field, and once to activate button. This is probably how I'll work around it.

Hope that you can follow well enough!



Use a button instead of script trigger