hassam36 Posted March 4, 2008 Posted March 4, 2008 Hello Using a script, I am trying to execute a Find, then Extend the Found Set with a another qualifier. However, the result is only capturing the value returned from the initial Find. I've included the steps below. Any idea what is missing? Joe Go to Layout… Enter Find Mode [] Set Error Capture [On] Set Field […] Perform Find [] Enter Find Mode [] Set Error Capture [On] Set Field […] Extend Find []
Fenton Posted March 4, 2008 Posted March 4, 2008 (edited) Offhand, it looks OK. Except you are using Set Error Capture ["On"], but you're not doing anything with the error, if any. So, it is quite possible that the 1st Find is working, but the Extend Find didn't find anything more, so it's returning your 1st found set with no message. Try: If [ Get (LastError) ≠ 0 ] Beep Show Custom Dialog [ whatever ] End If Or try running it with Set Error Capture ["On"] disabled and see what's happening. Also, I believe you only need 1 Set Error Capture ["On"], which stays in effect until the script ends, or you turn it off. Edited March 4, 2008 by Guest
hassam36 Posted March 4, 2008 Author Posted March 4, 2008 Thanks Fenton. I turned error capture off and found the problem.
Fitch Posted March 4, 2008 Posted March 4, 2008 BTW, you don't have to turn error capture on twice. It stays on for the duration of the script unless you turn it off in that script. Also, instead of doing a Find and then another Find/Extend, you could just do a new find request (unless as Fenton pointed out, you actually want to trap the error separately for each Find request): Go to Layout… Enter Find Mode [] Set Error Capture [On] Set Field […] New Record/Request Set Field […] Perform Find []
Recommended Posts
This topic is 6107 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