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

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

Recommended Posts

Posted

I have been using a script that:

1) changes to a different layout

2) page setup

3) print

4) returns to a default layout

The question is that if at step 3 when the print dialog box comes up and the user chooses cancel, then they halt the script, they are left on the new layout from step one. What can I do if they cancel during any of the steps to then force the record back to a specific layout?

LR

Posted

Well, I know that many cancels can be caught by the Set ERror Capture [on] Then, you can have an on error segment that handles corrective measures. Worth testing anyway

Posted

No.

Use the "Allow User Abort [Off]" script step to prevent the user form cancelling the script mid-way through. Make it the very first step.

Posted

Set Error Capture on? So does this mean there is a way to include a section in my script that if the script is cancelled, at that point another section of the script will run that makes sure the user is returned to a certain layout?

LR

Posted

Set up a script such as this should get you what you want.

Set Error Capture[On]

Allow User Abort [Off]

Go to Layout [Print Layout]

Page Setup [Restore, No dialog] (If you want page setup)

Print []

Go to Layout [your Layout]

Enter Browse Mode

Dean

  • 3 weeks later...
Posted

The question I have relates to this. Currently I'm running a script like this for printing:

Go to Layout ["printlayout"]

Enter Preview Mode [pause]

Print []

I'd like to turn Allow User Abort off, so pushing cancel while paused in preview mode won't leave the user stuck on the print layout, but then there's no way for the user to cancel if they don't want to print afterall. I could add:

Show message[Print this layout?] OK/Cancel

after the print preview, but then the user has to press continue to stop pausing, then press Ok to print. Which doesn't seem the right way to do it either. Anyone know the better way to do this?

Posted

You could also use the error capturing "on" for this script.

Try this

allow abort off

set error capture on

go to layout "y"

enter preview mode ( pause )

print ( with dialogue)

if status (current error) =1

go to layout "x"

enter browse mode

set error capture off

allow abort on

exit script

end if

set error capture off

allow abort on

Then if the user cancels an action such as printing, error code 1 is created.

You could then send the user to the original layout.

The only down side is that the user has to press continue, and then cancel the printing to get back to the original layout. You could also have a global field with the number of the last layout entered when that layout is left, and then when the user cancels the script, they caould be redirected to layout number whatever they were in last.

You could also design a "pseudo preview" page in browse mode, "preshrunk" to fit a page, with read-only fields and a back button.

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