Jump to content

Layout interfering with OnObjectExit Script?


wedgeman

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

Recommended Posts

Am a bit lost on what (I think) should be a quite simple script:

Field 1 has a value list on layout.

Field 2 is a general text field for typed data entry..

My goal is to use Field 1 to trigger/manage a script which does severla things, but then leaves the mouse/selector inserted into Field 2, for ease of use...

 

So...

When I select an item in that value list, an OnObjectExit triggered script: 

  • sets a variable from that, then clears that field
  • inserts a calculated value (based on the variable created) in another field. 
  • Then it SHOULD "go to Field 2"... as in, after the script is done, the cursor should be inserted into Field 2 with a blinking cursor...

My problem is, this isn't working.

the first two parts are working flawlessly - it creates and acts on variables, as it should..
But it refuses to 'go to field' (or "go to object", if i try it that way)..

What's happening instead is this: the script runs, but the selector/mouse jumps on forward to the next object (if that object is in a tab order), or (if NOT in a tab order), it goes nowhere (it operates the script, but dies before setting mouse to the field or object).....

I also tried OnObjectModify and OnObjectSave.... No dice on either.....The mouse simply refuses to "go to field"....

additionally, i tried triggering ANOTHER script (which works on its own) - - simply "go to field 2".. but even that doesn't work..

thoughts?

 

My guess is that the script (as an OnObjectExit trigger) runs, then FMP assumes that after the script ends, the next object should be selected (rather than ending wherever I told it to end)...
 

anybody?

Edited by wedgeman
Link to comment
Share on other sites

On 12/20/2017 at 7:51 PM, Fitch said:

Try putting Exit Script[ 0 ] as the last step in your triggered script.

thanks!  that helped.

Actually, i found out that "commit record" is triggering it for whatever reason.  Don't know why.. if I "commit" it won't allow me to then 'go to object xx".... go figure...   but it works now... thanks!

Link to comment
Share on other sites

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