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

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

Recommended Posts

Posted

I have a script that calls upon a number of subscripts that do a bunch of finds, then change the data of the found sets, then do some importing and exporting. The whole process takes about an hour and a half. I've been working on setting this up so it happens automatically in the middle of the night.

My problem is, if one of the finds happens to return a zero set (which could normally happen), then I get the error box that says "No Found Records", and it waits for me to click "continue". The next hour of the script hangs waiting for this.

I've been playing around with including a "Set Error Capture-On" script step. This seems to work, but if I include an If statement that checks for error status 401 & exits script, then it all fails.

Putting the capture step above the find step allows it to work. I've also found that if the finds are subscripts, it fails if the Capture step is placed in the subscript. It seems to need to be placed in the primary script only.

If it works, why am I asking you folks about it? Because I don't understand what is happening what I turn on Capture, and I would like to fully comprehend every step of my scripts! So, why is it working this way?

Posted

Because you are misunderstanding something. Set Error Capture[On] should generally be used in every subscript. You need to be careful because you may have accidentially changed it to [Off].

I generally only use the statement specifically when I am doing a find, as this is generally the only time when it is really needed. As in:

Set Error Capture[On]

Perform Find []

Set Error Capture[Off]

This way it is explictally turned on and off, exactly when it is needed. This is the kind of controls that you need, especially for a long complicated automatic procedure.

Posted

Many thanks! I now get what the script step does. I've taken your advice and flanked all scripted finds with error capture on/off pairs. It is working beautifully.

Posted

Within each seperate script encase the ONLY steps that you want to error capture.

For example:

Set Error Capture[On]

Perform Find []

Set Error Capture[Off]

will capture the errors generated with the Perform Find step.

Posted

Hey,

Did you say that Set Error Capture should be executed with every sub-script??

Should it be:

SetErrorCapture= on

Perform script [sub-script]

SetErrorCapture= off

I'd like to know becuase I have a script running many subscripts, but don't have any error capture.

Thanks,

Ken

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