# Change content daily based on some logic

**URL:** <https://community.glideapps.com/t/change-content-daily-based-on-some-logic/40291>\
**Category:** Ask for Help\
**Created:** [March 31, 2022, 3:20pm UTC](https://community.glideapps.com/t/change-content-daily-based-on-some-logic/40291 "2022-03-31T15:20:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexandru\_Giuseppe\_I](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alexandru_giuseppe_i/32/40893_2.png) [@Alexandru\_Giuseppe\_I](https://community.glideapps.com/u/Alexandru_Giuseppe_I)\
**Post date:** [March 31, 2022, 3:20pm UTC](https://community.glideapps.com/t/change-content-daily-based-on-some-logic/40291/1 "2022-03-31T15:20:42Z")

</div>

Hey everyone,  
I’m thinking if it’s possible to achieve the following scenario in Glide:

If a specific user sees 3 cards today, and if she checks the app tomorrow to see the next 3 cards and so on…  
Basically, to limit a specific user to only see 3 cards/day and every new day to display the next cards 3 cards and so on. Or to have some sort of randomizing the cards displayed so each we display 3 new/different cards.

Would such logic work in Glide?  
Thanks a lot,

---

<div class="post-metadata">

**Author:** ![JuanM](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/juanm/32/33666_2.png) [@JuanM](https://community.glideapps.com/u/JuanM)\
**Post date:** [March 31, 2022, 4:00pm UTC](https://community.glideapps.com/t/change-content-daily-based-on-some-logic/40291/2 "2022-03-31T16:00:45Z")

</div>

Hello, excuse the English of google 🤣

I have not created something like that, but I see it very possible. these are my thoughts

1.- that the data displayed on cards have ID  
2.- you would need a counter to know how many cards the user has seen  
3.- a column to accumulate the id of the seen cards  
4.- filter the screen of the cards that do not show the accumulated in step 3 and order them randomly

---

<div class="post-metadata">

**Author:** ![Alexandru\_Giuseppe\_I](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alexandru_giuseppe_i/32/40893_2.png) [@Alexandru\_Giuseppe\_I](https://community.glideapps.com/u/Alexandru_Giuseppe_I)\
**Post date:** [March 31, 2022, 4:36pm UTC](https://community.glideapps.com/t/change-content-daily-based-on-some-logic/40291/3 "2022-03-31T16:36:12Z")

</div>

This is very interesting @JuanM!  
I would message you in private maybe you can help me with this 🙂

---

<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:** [April 1, 2022, 12:27am UTC](https://community.glideapps.com/t/change-content-daily-based-on-some-logic/40291/4 "2022-04-01T00:27:41Z")

</div>

How many cards do you have in total?

Following @JuanM’s idea, I would do something like this:

- Have a button to know the first day the user logs in to your app and create a profile.
- Create a Math column to calculate the number of days it has passed since the user first logs in.
- Use a lookup - array index trick to get the index of the cards - from top to bottom.
- Create a “Pack index” column that uses the formula below.

FLOOR(Index/3)

So the Pack Index of 0, 1, 2 would be 0. 3, 4, 5 would be 1. 6, 7, 8 would be 2.

Filter the list of cards like this: Pack Index equals to user’s “Days passed since 1st log in” column.

So in the first day they see 0, 1, 2. Next day they see 3, 4, 5 etc.

The downside to this is that if they skips a day then they will never be able to see the pack of that day again, I guess.
