Put a series of actions into one transaction, need a display to show the transaction is progressing

Hi,

There are 4 actions performed by click a button, those 4 actions may take up to 30 sec. I would like to use a progressing bar with "Indeterminate" on to show there is something going on in the background, otherwise the user may think there is nothing happening, so he or she may click the button multiple times.

event.source.SavePDF_1()
event.source.EmailReport_1()
event.source.SavePDF_2()
event.source.EmailReport_2()

Could someone to help me with figuring out the best way to do so?

Thanks in advance.

Judy

The idea is when click the button, the progressing bar visible will be 1, so the user will see the progressing bar on the screen. When all 4 transactions are completed, the progressing bar visible will be 0. So the user can understand the transactions are done.

Vision? Can you add the tag to your question (or the Perspective tag if it's that). Thanks.

Don't forget, Wiki - how to post code on this forum.

Based on the OP's other topics, I am going to assume Vision.

If that assumption is correct, check this out;

3 Likes

Combination of invokeAsynchronous and invokeLater is the way.

3 Likes

You can prevent multiple button clicks by toggling off the button's enabled property at the beginning of the script.

Then, expanding upon the previous posts, call the long running task asynchronously using invokeLayer in the asynchronous function anytime something needs to be done in the gui such as updating the progress bar or reenabling the button when everything is done.

3 Likes