# Need help on limiting the number of items

**URL:** <https://community.glideapps.com/t/need-help-on-limiting-the-number-of-items/66974>\
**Category:** Ask for Help\
**Created:** [October 14, 2023, 1:12pm UTC](https://community.glideapps.com/t/need-help-on-limiting-the-number-of-items/66974 "2023-10-14T13:12:26Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Teejay\_Oyeniran](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/teejay_oyeniran/32/61251_2.png) [@Teejay\_Oyeniran](https://community.glideapps.com/u/Teejay_Oyeniran)\
**Post date:** [October 14, 2023, 1:12pm UTC](https://community.glideapps.com/t/need-help-on-limiting-the-number-of-items/66974/1 "2023-10-14T13:12:26Z")

</div>

is it possible to limit the number of NEW lessons a user clicks on a day? The idea is not to binge them all. Limit to 4 new lessons in a day… and after the day expired, the next day should display the remaining lessons within the week… hope you all understand

 ![wellness](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/0/101ead94cd3685bdcc11cf6c5132568ac43da12e.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 14, 2023, 1:28pm UTC](https://community.glideapps.com/t/need-help-on-limiting-the-number-of-items/66974/2 "2023-10-14T13:28:03Z")

</div>

Lots of different ways to approach this. Here is one way:

- Add a User Specific date/time column to your Courses table
- Each time a user starts (or finishes, whatever) a lesson, use an action to set the value in that column to the current time
- In your Users table, create a Query column and target it at your Courses table. Filter it where the User Specific date/time column is “within today”
- Do a Rollup-\>Count through the Query column. If the count equals 4, don’t allow them to do any more lessons.

> [@Teejay\_Oyeniran](#):
>
> and after the day expired, the next day should display the remaining lessons within the week

- Set a filter on the Course list using the previously mentioned User Specific column. Only show courses where it is empty.

One downside with the above approach is that it won’t be possible for you (as an Admin user) to see which users have done which courses. I don’t know if that is a problem?

---

<div class="post-metadata">

**Author:** ![Teejay\_Oyeniran](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/teejay_oyeniran/32/61251_2.png) [@Teejay\_Oyeniran](https://community.glideapps.com/u/Teejay_Oyeniran)\
**Post date:** [October 16, 2023, 5:41am UTC](https://community.glideapps.com/t/need-help-on-limiting-the-number-of-items/66974/3 "2023-10-16T05:41:22Z")

</div>

This sounds interesting… l am not clear on this " \* Each time a user starts (or finishes, whatever) a lesson, use an action to set the value in that column to the current time"… how can l set up the action

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [October 16, 2023, 11:55pm UTC](https://community.glideapps.com/t/need-help-on-limiting-the-number-of-items/66974/4 "2023-10-16T23:55:17Z")

</div>

It depends on how you define the action of starting or finishing a lesson in your app. Do you have any built-in flows to determine those?

---

<div class="post-metadata">

**Author:** ![Teejay\_Oyeniran](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/teejay_oyeniran/32/61251_2.png) [@Teejay\_Oyeniran](https://community.glideapps.com/u/Teejay_Oyeniran)\
**Post date:** [October 17, 2023, 11:17am UTC](https://community.glideapps.com/t/need-help-on-limiting-the-number-of-items/66974/5 "2023-10-17T11:17:28Z")

</div>

No, l don’t have any built-in flows.

---

<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 17, 2023, 11:19am UTC](https://community.glideapps.com/t/need-help-on-limiting-the-number-of-items/66974/6 "2023-10-17T11:19:35Z")

</div>

So how does a user start a course?  
Do they click on something? Presumably yes.  
Does that something have an action? Presumably yes.  
Extend that action to set the date/time value.

---

<div class="post-metadata">

**Author:** ![Teejay\_Oyeniran](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/teejay_oyeniran/32/61251_2.png) [@Teejay\_Oyeniran](https://community.glideapps.com/u/Teejay_Oyeniran)\
**Post date:** [October 23, 2023, 11:06am UTC](https://community.glideapps.com/t/need-help-on-limiting-the-number-of-items/66974/7 "2023-10-23T11:06:32Z")

</div>

l’m sorry for the late reply… the list of courses are in a collection, it doesn’t have an action yet… how can l add an action on the collection?

---

<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 23, 2023, 11:10am UTC](https://community.glideapps.com/t/need-help-on-limiting-the-number-of-items/66974/8 "2023-10-23T11:10:05Z")

</div>

> [@Teejay\_Oyeniran](#):
>
> it doesn’t have an action yet… how can l add an action on the collection?

So when you click on a Collection Item, nothing happens?

---

<div class="post-metadata">

**Author:** ![Teejay\_Oyeniran](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/teejay_oyeniran/32/61251_2.png) [@Teejay\_Oyeniran](https://community.glideapps.com/u/Teejay_Oyeniran)\
**Post date:** [October 24, 2023, 7:26am UTC](https://community.glideapps.com/t/need-help-on-limiting-the-number-of-items/66974/9 "2023-10-24T07:26:17Z")

</div>

basically nothing happens, it’s like it’s on a read mode… how can we setup an action when a user clicks on a video in a item in the collection??

---

<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 24, 2023, 10:47am UTC](https://community.glideapps.com/t/need-help-on-limiting-the-number-of-items/66974/10 "2023-10-24T10:47:29Z")

</div>

The Video component doesn’t support actions.  
You would need to configure an action on the Collection Item itself.
