Jump to content

Return focus to field in a portal


Recommended Posts

I have a script that tests the Product Code field, in a portal, for validity (using a script trigger -- "on exit"--Attached to the Product Code field) so if the user doesn't enter a known value, a Custom Dialog window appears telling them so; the script then clears the product code field so the user can re-enter a known product code. That part of the script works.

The problem I'm running into is that after the script clears the Product Code  field (k_ProductCode__lxt) using the Set Field command, I can't find the correct command to place the cursor back into the Product Code field so the user can re-enter a value ; I've tried many variations of Go To Field (using hard coding and a variable, GFN (Get Field Name)), but I just can't get the cursor back into the field.

What's the secret? ...or is there a better way of accomplishing the same thing?

Cheers and TIA for your help.

Screen Shot 2021-05-04 at 8.51.52 AM.png

Untitled.pdf

Link to post
Share on other sites

Currently, there are 98 codes but more will be added next week to bring it up to around 160.

Link to post
Share on other sites
Posted (edited)
2 hours ago, WF7A said:

I can't find the correct command to place the cursor back into the Product Code field so the user can re-enter a value

You don't need to. A script triggered OnObjectExit runs before the active object is exited. If you exit the script with a false result, the triggering action will be canceled and user will remain in the field they are trying to exit.
https://help.claris.com/en/pro-help/content/onobjectexit.html

 

 

 

Edited by comment
Link to post
Share on other sites

Ah, thanks. I deleted all but the Show Custom Dialog script step and added Exit Script [TestResult: False]. Yay!

Link to post
Share on other sites

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.