# Creating loop Action in glide

**URL:** <https://community.glideapps.com/t/creating-loop-action-in-glide/33312>\
**Category:** Ask for Help\
**Created:** [October 20, 2021, 2:39am UTC](https://community.glideapps.com/t/creating-loop-action-in-glide/33312 "2021-10-20T02:39:52Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Moumita\_Baral](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/moumita_baral/32/32412_2.png) [@Moumita\_Baral](https://community.glideapps.com/u/Moumita_Baral)\
**Post date:** [October 20, 2021, 2:39am UTC](https://community.glideapps.com/t/creating-loop-action-in-glide/33312/1 "2021-10-20T02:39:52Z")

</div>

How to create e loop action for row columns after certain criteria met?

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [October 20, 2021, 2:51am UTC](https://community.glideapps.com/t/creating-loop-action-in-glide/33312/2 "2021-10-20T02:51:50Z")

</div>

This sort of thing is only possible if it’s based on user interaction.  
For example, you might have a counter that increments a column value by 1 every time a button is tapped, and then resets it to zero once it reaches a certain value. But again, that relies on the user actually tapping the button.

Can you describe your actual use case?

---

<div class="post-metadata">

**Author:** ![Moumita\_Baral](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/moumita_baral/32/32412_2.png) [@Moumita\_Baral](https://community.glideapps.com/u/Moumita_Baral)\
**Post date:** [October 20, 2021, 3:00am UTC](https://community.glideapps.com/t/creating-loop-action-in-glide/33312/3 "2021-10-20T03:00:21Z")

</div>

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/5/e5d019b188c140c3ad2977f58572457030eb9db9.png)  
I want this progress bar to change repeatedly after one click.  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/a/ca90aa9602700f0a3c4961bce4d7fd2d1b05a746.png)  
also change these column values in a loop

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [October 20, 2021, 3:07am UTC](https://community.glideapps.com/t/creating-loop-action-in-glide/33312/4 "2021-10-20T03:07:13Z")

</div>

> [@Moumita\_Baral](#):
>
> change repeatedly after one click.

Based on what criteria?  
Time?  
I mean, do you want the progress bar to increase as time passes?  
That is possible, yes.

For example, tapping the Start button could set a column to the current time, and then you could have a math column that calculates the number of minutes/seconds that have elapsed since the button was tapped. And then the result of that math column could drive the progress bar.

But I’m not sure where the loop comes in?

---

<div class="post-metadata">

**Author:** ![Moumita\_Baral](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/moumita_baral/32/32412_2.png) [@Moumita\_Baral](https://community.glideapps.com/u/Moumita_Baral)\
**Post date:** [October 20, 2021, 4:00am UTC](https://community.glideapps.com/t/creating-loop-action-in-glide/33312/5 "2021-10-20T04:00:54Z")

</div>

I mean once you click the button the progress bar or timer will start and that timer will continue like a loop until I stop. Think this 1-minute timer will end and start again without clicking any button

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/3/530509dd9f8a37256c10a75fae93c738ff31ab9a.png)

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [October 20, 2021, 5:03am UTC](https://community.glideapps.com/t/creating-loop-action-in-glide/33312/6 "2021-10-20T05:03:41Z")

</div>

Are you looking for something like this?

Glide only updates the time once every 10 seconds, so using this method you only see a change at that interval.

---

<div class="post-metadata">

**Author:** ![Moumita\_Baral](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/moumita_baral/32/32412_2.png) [@Moumita\_Baral](https://community.glideapps.com/u/Moumita_Baral)\
**Post date:** [October 20, 2021, 5:08am UTC](https://community.glideapps.com/t/creating-loop-action-in-glide/33312/7 "2021-10-20T05:08:00Z")

</div>

Yes like this but this 10 sec will run repeatedly the button will not be triggered

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [October 20, 2021, 5:12am UTC](https://community.glideapps.com/t/creating-loop-action-in-glide/33312/8 "2021-10-20T05:12:10Z")

</div>

What I showed there will keep running in one minute cycles until you tap the stop button.

> [@Moumita\_Baral](#):
>
> but this 10 sec will run repeatedly the button will not be triggered

I don’t understand what you mean by that, sorry.

---

<div class="post-metadata">

**Author:** ![Moumita\_Baral](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/moumita_baral/32/32412_2.png) [@Moumita\_Baral](https://community.glideapps.com/u/Moumita_Baral)\
**Post date:** [October 20, 2021, 5:15am UTC](https://community.glideapps.com/t/creating-loop-action-in-glide/33312/9 "2021-10-20T05:15:04Z")

</div>

Yes, I am sorry for my mistake. Can you please tell me the process?

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [October 20, 2021, 5:23am UTC](https://community.glideapps.com/t/creating-loop-action-in-glide/33312/10 "2021-10-20T05:23:10Z")

</div>

Sure. There are just two columns used there:

- The first is a User Specific date/time column  
– When you tap the 'Start` button, the action writes the current date/time into this column  
– When you tap the ‘Stop’ button, the action clears the value in this column
- The Start/Stop buttons have visibility conditions configured: Start is visible only when the User Specific column is empty, Stop is visible when it is not
- The second column is a math column, using the following formula:

```auto
Mod((Now-Start)*86400,60)

```

- Where Now is the current date/time, and Start is the value of the User Specific column
- The Progress Bar is configured using the data from the math column, with a minimum of 0, and a maximum of 60

When you tap start, it always seems to start with a value somewhere around 55-60. I haven’t figured out why that happens. In theory, it should start at zero.

---

<div class="post-metadata">

**Author:** ![Moumita\_Baral](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/moumita_baral/32/32412_2.png) [@Moumita\_Baral](https://community.glideapps.com/u/Moumita_Baral)\
**Post date:** [October 20, 2021, 5:31am UTC](https://community.glideapps.com/t/creating-loop-action-in-glide/33312/11 "2021-10-20T05:31:21Z")

</div>

Can I do this for 25 min as well?

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [October 20, 2021, 5:36am UTC](https://community.glideapps.com/t/creating-loop-action-in-glide/33312/12 "2021-10-20T05:36:02Z")

</div>

Yes, just change the math formula to use 1500 as the modulus operator instead of 60. And then set the maximum on the progress bar to 1500.
