Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

I have encountered a new problem which I have never seen before. A script is performing a find with Set Error Capture [On]. I have the script performing a find and immediately following the find, Set Variable[$lastError = Get (LastError)]. However, after the find fails to find any records, it is still reporting the last error as "0". I have verified this by running it in Script Debugger and it fails to produce the 401 error after not finding any records. Have any of you encountered this issue?

Posted

Have any of you encountered this issue?

Yes.

In my instance I had a script trigger on the layout which kicked in when returning to browse mode (immediately after the find request). The triggered script then ran and "swallowed" up the error, leaving no error in the original script.

Seemingly script triggers execute before the next step in the current script.

Incidentally, disable the Set Error Capture [On] and see if you get the FM dialog that the find request has failed.

Posted

Yes.

In my instance I had a script trigger on the layout which kicked in when returning to browse mode (immediately after the find request). The triggered script then ran and "swallowed" up the error, leaving no error in the original script.

Seemingly script triggers execute before the next step in the current script.

Incidentally, disable the Set Error Capture [On] and see if you get the FM dialog that the find request has failed.

IdealData, you rock! That was precisely it! I did not realize that when you are running Script Debugger, that scripts called by triggers don't show up. Immediately after performing the find, an "on record load" script was running, and since it did not show up in debugger, I didn't realize the interference. I have now made another layout on which to perform the find, which allows the error to be captured. And BTW, I had already tried disabling the Set Error Capture [On] and it does catch the error there. That is why this was so baffling.

I owe you a beer.

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