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

**URL:** <https://forum.inductiveautomation.com/t/put-a-series-of-actions-into-one-transaction-need-a-display-to-show-the-transaction-is-progressing/83645>\
**Category:** Ignition\
**Created:** [December 31, 2023, 4:15pm UTC](https://forum.inductiveautomation.com/t/put-a-series-of-actions-into-one-transaction-need-a-display-to-show-the-transaction-is-progressing/83645 "2023-12-31T16:15:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jdenchev](https://avatars.discourse-cdn.com/v4/letter/j/f4b2a3/32.png) [@jdenchev](https://forum.inductiveautomation.com/u/jdenchev)\
**Post date:** [December 31, 2023, 4:15pm UTC](https://forum.inductiveautomation.com/t/put-a-series-of-actions-into-one-transaction-need-a-display-to-show-the-transaction-is-progressing/83645/1 "2023-12-31T16:15:04Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jdenchev](https://avatars.discourse-cdn.com/v4/letter/j/f4b2a3/32.png) [@jdenchev](https://forum.inductiveautomation.com/u/jdenchev)\
**Post date:** [December 31, 2023, 4:17pm UTC](https://forum.inductiveautomation.com/t/put-a-series-of-actions-into-one-transaction-need-a-display-to-show-the-transaction-is-progressing/83645/2 "2023-12-31T16:17:47Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [December 31, 2023, 4:23pm UTC](https://forum.inductiveautomation.com/t/put-a-series-of-actions-into-one-transaction-need-a-display-to-show-the-transaction-is-progressing/83645/3 "2023-12-31T16:23:53Z")

</div>

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](https://forum.inductiveautomation.com/t/wiki-how-to-post-code-on-this-forum/77831).

---

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [December 31, 2023, 4:42pm UTC](https://forum.inductiveautomation.com/t/put-a-series-of-actions-into-one-transaction-need-a-display-to-show-the-transaction-is-progressing/83645/4 "2023-12-31T16:42:42Z")

</div>

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

If that assumption is correct, check this out;

> [@Update GUI via Asynchronous thread](https://forum.inductiveautomation.com/t/update-gui-via-asynchronous-thread/9666):
>
> I’ve got a script I am experimenting with that can take a lot of time to execute, so I now use the system.util.invokeAsynchronous to run the script in a separate thread to keep the GUI from locking up. I am using the asynchronous thread to copy files from one place to another, and I would like to show the progress of the file copy with a progress bar. How would I go about this? I am importing a few python libraries to do this. import shutil def fileTransfer(): path = system.file.openFile() …

---

<div class="post-metadata">

**Author:** ![bschroeder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bschroeder/32/13260_2.png) [@bschroeder](https://forum.inductiveautomation.com/u/bschroeder)\
**Post date:** [December 31, 2023, 4:56pm UTC](https://forum.inductiveautomation.com/t/put-a-series-of-actions-into-one-transaction-need-a-display-to-show-the-transaction-is-progressing/83645/5 "2023-12-31T16:56:41Z")

</div>

Combination of invokeAsynchronous and invokeLater is the way.

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [December 31, 2023, 10:47pm UTC](https://forum.inductiveautomation.com/t/put-a-series-of-actions-into-one-transaction-need-a-display-to-show-the-transaction-is-progressing/83645/6 "2023-12-31T22:47:02Z")

</div>

> [@jdenchev](#):
>
> so he or she may click the button multiple times.

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.
