AnsweredAssumed Answered

Conditional Field Navigation Using Script Triggers

Question asked by richardsrussell on Sep 8, 2012
Latest reply on Sep 8, 2012 by comment

Using FMPA 12.0v2 under Mac OS X 10.7.4.

 

I'm working on a database to capture wages, hours, and working conditions for restaurant workers, many of whom are immigrants. Here are some of the variables we're interested in:

 

Language Initial.jpg

 

The one of interest is "Language", which is #32 in the tab order. "National Origin", right below it, is #33. Off to the right is "Language Other", which is not in the tab order at all. My objective is to go directly from "Language" to "National Origin" unless there's a check mark in "Other", in which case I want to go to "Language Other", stick in a prompt (highlighted because the entire field contents are selected), and then stop and wait for user input. This seemed like a job for script triggers, so I built one to be executed "OnObjectExit" from "Language". The desired effect should look like this:

 

Language Expected.jpg

 

Instead, what I get is this:

 

Language Other.jpg

 

As you can see, the script successfully inserted the prompt ("OtherLanguage") in the field, but then, instead of sticking around there, it continued on to the next field in the tab sequence. Here are the relevant script steps:

 

Language Script.jpg

 

Wherein have I erred?

Outcomes