What is the trigger for this script? onModify, onExit ?
What happens if you add a commit record step at the top of the triggered script to be sure you are not still in a field when you go to the next record?
May have to do with the sorting... If you are entering a date and the found set is sorting on date. It could wind up in an un-predictable position as soon as the field is saved. Because the date is changed.
There is no date field.
I have tried onExit and on onSave with incorrect behavoir. On modify works correclty however I need to add more than on digit so on modify wont helptme.
I tried a couple experiments:
onValidate with and without recored commit - went to the next record but wrong field,
onSave with and without recored commit - went to the next record but wrong field,
onExit with record commit - locked up for about 20 seconds.
onExit without record commit - went to the Last record and wrong field,
I begining to think I have a corrupted layout????
Trying to reconcile your first post and latest:
- advance to the next record when the date is entered
- There is no date field
However, do you need this trigger script to fire regardless of what is entered in the trigger field, or only if some criteria is met?
Are there any other triggers on the layout itself which might be interfering?
Can you post a sample file and provide clarification as to the desired result you are striving for?
My first post was wrong. It is a quantity to be entered not date. There is no date field
All layout scripts were deleted. No other fields have script triggers.
Trigger should fire not matter what is entered, even if nothing is entered.
I want to enter a columun of numbers going from record to record in the same field in list viewMuch like a spread sheet.
One might expect an onExit from the field would work as a trigger. However, onExit is one of those triggers which executes the script before the exit-field is allowed to complete. This means you can test within the script and then exit the script with a true (1) or false (0) script result. That result determines if you get to exit the field or not.
That may mean that whatever you are trying to accomplish within the script is actually being attempted while you are still in the field, which would explain the delays and misdirection from using that trigger.
Look over the details of script triggers in the built-in FileMaker Help files at:
Home > Designing and creating databases > Creating and managing layouts and reports > Setting up script triggers
Go to next record
and an OnRecordLoad trigger = Go To Field (your field here)
You've got an OnObjectExit trigger on a field.
When you attempt to exit that field, it triggers the script, that script goes to the next record...which triggers the script, putting you in a loop.
The easy solution? At the end of the script, put in an Exit Script[False] script step.
Message was edited by: DavidJondreau
FYI I have entered the date and run my reports the hard way, so this is not urgent at this point.
I am still trying to wrap my head around why something so "simple" did not work. Davids last post makes sense, at least visually is looks like a loop.
Stephen last suggestion did work but only after I removed all tab controls on the layout.
This maybe the behavior of these triggers, if so that answers my question.
Thanks for everyones help.