Rich S Posted May 4, 2021 Share Posted May 4, 2021 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. Untitled.pdf Link to comment Share on other sites More sharing options...
Steve Martino Posted May 4, 2021 Share Posted May 4, 2021 How many different product codes are there? Maybe a pop up or drop down would work better? Link to comment Share on other sites More sharing options...
Rich S Posted May 4, 2021 Author Share Posted May 4, 2021 Currently, there are 98 codes but more will be added next week to bring it up to around 160. Link to comment Share on other sites More sharing options...
comment Posted May 4, 2021 Share Posted May 4, 2021 (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 May 4, 2021 by comment Link to comment Share on other sites More sharing options...
Rich S Posted May 4, 2021 Author Share Posted May 4, 2021 Ah, thanks. I deleted all but the Show Custom Dialog script step and added Exit Script [TestResult: False]. Yay! Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 1080 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