How to show all previous challenges unlocked by the signed-in user?

Hey guys! I’m only new to Glide in the last couple weeks, but loving it so far.

I’m building a mindset challenge app and trying to figure out how to display all previous challenges that a user has unlocked, based on what day they’re up to.

Here’s what I’ve got:

  • A Users table with columns that calculate what day each person is currently on (e.g. Wal is on Day 3)

  • A Challenges table with a Day column from 1 to 28

  • The layout source for “All Challenges” is the Challenges table

What I want is:
If Wal is on Day 3, the “All Challenges” screen should only show Challenges 1, 2 and 3. It should hide anything beyond the current day.

I imagine I need some sort of relation or lookup that pulls the user profile into the Challenges table or compares the day somehow, but I’m not sure how to make that happen or how to reference the currently signed-in user.

I already have a separate tab that correctly shows today’s challenge, I just can’t figure out how to show all previous ones together.

Hope that makes sense! Appreciate any help :folded_hands:

1 Like

Use a filter on your Collection: “Day is equal to or less than User Profile→Days Since Challenge Started”

1 Like

Wow I’ve spent 3 hours trying to work that out and you fixed it in 2 seconds! Thank you

2 Likes