# Limiting Things

**URL:** <https://community.glideapps.com/t/limiting-things/30804>\
**Category:** Ask for Help\
**Created:** [August 23, 2021, 2:35am UTC](https://community.glideapps.com/t/limiting-things/30804 "2021-08-23T02:35:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sanch3221](https://avatars.discourse-cdn.com/v4/letter/s/f6c823/32.png) [@Sanch3221](https://community.glideapps.com/u/Sanch3221)\
**Post date:** [August 23, 2021, 2:35am UTC](https://community.glideapps.com/t/limiting-things/30804/1 "2021-08-23T02:35:11Z")

</div>

Hello again,

I am trying to figure out a way to be able to limit the amount of items someone could add to their cart. For example, I have a discount package that you could add to get 5% off, but I would like to limit how many times that package could be added to the cart to ensure that people cannot add it more than once to get a higher discount. Has anyone ever tried this?

Any insight is HIGHLY appreciated,  
Sav

---

<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:** [August 23, 2021, 2:42am UTC](https://community.glideapps.com/t/limiting-things/30804/2 "2021-08-23T02:42:39Z")

</div>

You could use an action to either increment a counter or set a boolean column when a user adds the item to their cart. And then set a visibility condition to hide the component once the limit is reached or the boolean is set.

---

<div class="post-metadata">

**Author:** ![Sanch3221](https://avatars.discourse-cdn.com/v4/letter/s/f6c823/32.png) [@Sanch3221](https://community.glideapps.com/u/Sanch3221)\
**Post date:** [August 27, 2021, 12:20am UTC](https://community.glideapps.com/t/limiting-things/30804/3 "2021-08-27T00:20:54Z")

</div>

Hey Darren! Could you explain more about the Boolean column? I think you may be on to something!

---

<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:** [August 27, 2021, 1:50am UTC](https://community.glideapps.com/t/limiting-things/30804/4 "2021-08-27T01:50:42Z")

</div>

Well, whether I’d recommend a boolean or a number type depends on the number of items you want to limit them to. If it’s just _one_, then I’d use a boolean, otherwise a number column.

So, let’s assume each user can claim the “discount package” just once.

- You could have a user specific boolean column - “discount package claimed” (or whatever).
- The component that they use to claim the package would have a visibility condition - “when discount package claimed is not true”.
- Then when a user “claims” the discount, you have an action that sets that column to true, and the component disappears.
