ron G Posted February 13, 2011 Posted February 13, 2011 Here is another description of the problem: I have a table called Members. On this table (in a 1:many) is Dues which is a portal. The fields on the Dues portal are: DATE DUES PAIDYEAR Date has an ONOBJECTSAVE trigger that runs a script called DuesDefault. DuesDefault looks like this: Go to Field PAIDYEAR -- This works IF --- setfield (all setfields work and are on the portal... but still on Members. Else-- setfield ENDIF IF--- setfield Else setfield ENDIF >>>As I run Debugger, I can see that the Go To Field sends the cursor to PAIDYEAR but... when the script falls out of the last ENDIF, the cursor jumps to the DUES field? A subsequent GO TO FIELD PAIDYEAR DOES NOTHING??? I have also tried Setfield. Nope. So far I have been baffled by this for 3 days. Pleazzzzzzz, does anyone have idea how I can get the cursor to go to PAIDYEAR at the end of the script?
Wim Decorte Posted February 13, 2011 Posted February 13, 2011 what's the purpose of the blank Set Field? For good measure remove the tab order from all fields if you're not using it.
bruceR Posted February 13, 2011 Posted February 13, 2011 Suggest you post the entire script; or a copy or clone of the file. As mentioned by Wim; the setfield with no target makes no sense. Set field does exactly that; sets contents of a specified field to a specified value. The field does not have to be on the layout and the set field script step has no relation to navigating to particular fields.
ron G Posted February 13, 2011 Author Posted February 13, 2011 Suggest you post the entire script; or a copy or clone of the file. As mentioned by Wim; the setfield with no target makes no sense. Set field does exactly that; sets contents of a specified field to a specified value. The field does not have to be on the layout and the set field script step has no relation to navigating to particular fields. RE: Setfield. I did that as an act of despiration to see if it would contribute to a solution. The problem remains that Go To Field doesn't work -- unless I put an Exit below it. (Exit is the last instruction in the script). Why should that work? (I wonder if my FM 11 03 upgrade screwed up something?)
bruceR Posted February 13, 2011 Posted February 13, 2011 Pointless to discuss until we see your entire script or your file. Basically zero chance of any other problem except for a script logic error problem. Further, you should understand the exit options for onObjectSave script triggers: http://fmhelp.filemaker.com/fmphelp_11/en/html/script_trigg.38.6.html#1028606
Recommended Posts
This topic is 5031 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 accountSign in
Already have an account? Sign in here.
Sign In Now