Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

Hi,

 

I'm not very familiar with the user interface possibilities that FileMaker offers when it comes down to navigating the user to the next field that he needs to fill in for a specific task. Imagine the following scenario:

 

A user types in a value, say «iPad», into a field «Table::Item».

An onObjectSave script checks this value, and sets the next field (tab order) «Table::Price» to «$399».

Then fills a couple of other fields that are further down the tab order in the current layout, to spare some time for the user.

Then, after all Set Fields are done, onObjectSave wants to allow the user to be able to directly enter the next logical value for him. So it ends with a «Go To Field [Table::Color]» and makes this field active.

 

Sound good, but this doesn't work as expected. FileMaker remembers that the user closed his field input in Table::Item with a tab key and now makes Table::Color inactive, even though Go To Field was specifically specified. FileMaker now goes to the previously (way back in Table::Item) next field and makes it active, which is Table::Price, thus making more work for the user.

 

In this scenario, Go To Field [] is completely worthless. Or am I overlooking something? What do you do in such a scenario?

 

Thanks a lot for any hints.

 

Gary

 

Posted

If you want your script to cancel the triggering event (in this case the tab keypress), then your script must exit with a false result. Otherwise the tab keypress will be executed immediately following the script.

Posted

Your expectation may be off.  The onSave event happens before the onExit, the onExit is triggered by the tab so that that one is the last in the queue of events and when it exits the field it will tab to the next field in the tab order.

 

As comment indicates: cancel the original event or handle this through the onExit event.

  • 2 weeks later...
Posted

Makes sense, I didn't know that onExit is triggered by the tab (and probably by the enter key or mouse click somewhere else and maybe a bunch of other stuff).

 

So, when I use Go to Field [] in any previous Script Trigger, I just return a False in onExit. Cool.

 

Thanks a lot,

 

Gary

This topic is 3812 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.