# I want to show a progress bar while i'm running a loop but it does not update the window till the loop is done

**URL:** <https://forum.inductiveautomation.com/t/i-want-to-show-a-progress-bar-while-im-running-a-loop-but-it-does-not-update-the-window-till-the-loop-is-done/40704>\
**Category:** Ignition\
**Created:** [November 16, 2020, 7:23pm UTC](https://forum.inductiveautomation.com/t/i-want-to-show-a-progress-bar-while-im-running-a-loop-but-it-does-not-update-the-window-till-the-loop-is-done/40704 "2020-11-16T19:23:17Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [November 16, 2020, 7:37pm UTC](https://forum.inductiveautomation.com/t/i-want-to-show-a-progress-bar-while-im-running-a-loop-but-it-does-not-update-the-window-till-the-loop-is-done/40704/3 "2020-11-16T19:37:19Z")

</div>

Either way, you need to have your script run asynchronously from the foreground.

> [@Update progress bar from within a script](http://forum.inductiveautomation.com/t/update-progress-bar-from-within-a-script/21995):
>
> I have this script on a button to copy data to a PLC from a database. Since this script takes 10 - 20 seconds to run, i would like to have the progress bar show progress. Issue I have is the progress bar updates only when the script has completed. Is there anyway to get value outside of the script to update as the script is running?

---

_[View the full topic](https://forum.inductiveautomation.com/t/i-want-to-show-a-progress-bar-while-im-running-a-loop-but-it-does-not-update-the-window-till-the-loop-is-done/40704)._
