# Progress Bar Help

**URL:** <https://discourse.holoviz.org/t/progress-bar-help/496>\
**Category:** Panel\
**Created:** [April 14, 2020, 10:55pm UTC](https://discourse.holoviz.org/t/progress-bar-help/496 "2020-04-14T22:55:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![t-houssian](https://discourse.holoviz.org/user_avatar/discourse.holoviz.org/t-houssian/32/2694_2.png) [@t-houssian](https://discourse.holoviz.org/u/t-houssian)\
**Post date:** [April 14, 2020, 10:55pm UTC](https://discourse.holoviz.org/t/progress-bar-help/496/1 "2020-04-14T22:55:35Z")

</div>

Hi guys!

I’m needing some help with the progress bar widget. I am currently trying to use the indeterminate bar and am having troubles making it turn on and off based on an action parameter (Button).

Here is my code, I’m wanting the bar active to be set to True while the function get\_final\_dataframes is running (usually about 20 sec) and then active to be set to false when it is done.

I have tried to do self.indeterminate.active = True before the function call, and self.indeterminate.active = False after the function call but that does not seem to work.

```
calculate = param.Action(lambda x: x.param.trigger('calculate'), label='Calculate')

indeterminate = pn.widgets.Progress(name='Indeterminate Progress', active=False, width=200)

@param.depends('calculate', 'date_select', watch=True) # What occurs when calculate is clicked on
def handler(self):
    self.shares_to_buy, self.shares_to_sell, self.rebalanced_df, self.apex_buys, self.apex_sells = get_final_dataframes()
    print("Tables Updated\n")
```

---

<div class="post-metadata">

**Author:** ![t-houssian](https://discourse.holoviz.org/user_avatar/discourse.holoviz.org/t-houssian/32/2694_2.png) [@t-houssian](https://discourse.holoviz.org/u/t-houssian)\
**Post date:** [April 14, 2020, 11:02pm UTC](https://discourse.holoviz.org/t/progress-bar-help/496/4 "2020-04-14T23:02:04Z")

</div>

```
calculate = param.Action(lambda x: x.param.trigger('calculate'), label='Calculate')

indeterminate = pn.widgets.Progress(name='Indeterminate Progress', active=False, width=200)

@param.depends('calculate', 'date_select', watch=True) # What occurs when calculate is clicked on
def handler(self):
    self.indeterminate.active = True
    self.shares_to_buy, self.shares_to_sell, self.rebalanced_df, self.apex_buys, self.apex_sells = get_final_dataframes()
    self.indeterminate.active = False
    print("Tables Updated\n")
```
