March 4, 200817 yr 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 []
March 4, 200817 yr 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, 200817 yr by Guest
March 4, 200817 yr 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 []
Create an account or sign in to comment