how can i make every choices has its limits at the CHOICE component
I have used the limit number of items and it turned out not to be what I wanted, because what I wanted was that every choice had a limit, for example:
in the choice there are A, B, C
A = 10 clicks
B = 10 clicks
C = 10 clicks
and when it reaches 10 clicks then A/B/C will disappear from the choice component (my hope)
You will need a relation and rollup from the table that is the source of your choices, to the table where those selections are stored. Then you can filter the choices where the rollup count is less than 10.
3 Likes
I’m new to using Glideapps and I’m trying to understand the solution given, but I still can’t find a way out, can you tell me how in detail, for example: click A → click B
Why do you want to limit the number of clicks? Do you mean a user can only click a choice component 10 times?
The choice component contains the choice of worship 1/2/3, during this covid pandemic there are limitations and distances so that the number in the church is limited, therefore we make registration for those who register and choose worship 1/2/3, hopefully what we explain understandable.
actually not only 10 clicks but we need 150 clicks for each choice
Unfortunately, no.
This is confusing. Do you mean 150 clicks, or 150 choices?
Maybe if you can try to describe what should happen from a user perspective. Imagine that I am a user of your app. I’ve never used it before. I open it up, and what should I see?
There are some choice components on the screen - how many?
What do the choices represent?
What should happen when I make the first choice? Should this affect the available options in the second choice? If so, in what way?
What should happen once I’ve finished making choices?
1 Like
I assume you are submitting a form? Does a user pick a choice and then they submit the form? Which table stores your choices? Which table stores the form responses?
On the table that stores the choices, you should be able to create a relation column that links the choice value to the choice chosen in the form response sheet. Once you have that relation column set up, then you can create a rollup column that counts the number of rows in that relation. That will be your count. So if 150 people choose Worship 1, then there will be 150 new rows. The relation from the choices to the form responses will find 150 matching rows for choice 1. The rollup column will give you the count. Then you can set a filter on the choice component to only show choices where the rollup count is less than 150.
1 Like
Sorry if you don’t understand, I’ll try to explain in a simple way.
In component choice there are 3 choices, namely:
- Worship 1
- Worship 2
- Worship 3
and each of the 3 choices above has 150 seats so that it can be written as follows:
- Worship 1 (150 seats)
-Worship 2 (150 seats)
- Worship 3 (150 seats)
then what we want is where a registrant chooses one of the 3 options above, the seats will be reduced
example:
1 person registers and chooses Worship 1
then what happens from the number is as follows
- Worship 1 (149 seats)
-Worship 2 (150 seats)
- Worship 3 (150 seats)
and for example one of the 3 choices above runs out of seats then that choice will disappear from the options, it can be described as follows
- Worship 2 (150 seats)
- Worship 3 (150 seats)
Okay, that makes sense now.
It looks like what @Jeff_Hager described above is pretty much exactly what you need.
Why don’t you give that a go, and let us know if you get stuck at any point.
2 Likes
okay I’ll try it first, hopefully this problem can be resolved