Toggle switch component when adding data based on condition

Would be great if someone can help here. I am using glide to add some data on a spreadsheet. So basically - the person would enter data such as persons name, date of birth, age, country etc - what i want is if a person enters an age above 60 years - then i want the “OLD PERSON” choice component to auto toggle to on - but the person can manually set it back to OFF if they want - and it should not toggle back to on even if the age is above 60 years still.

Basically I want the toggle value to default based on some entry field and then be changeable.

Hey @Zebest,

I would use a If-then-else column.

If “age” is 60 then show the switch. Else nothing.

I hope this helps.

Thanks for your reply.
But it needs to be dynamic. So populate with value one time on age change but the toggle be seen and manually changeable too.

So if a person puts in 30 - the toggle should be off but they can manually turn on as well.

Or if person puts in 61 - the toggle should auto turn on but they can manually turn off.

Hope I explained it right.



I’m not sure if glide can automatically turn on switches like that yet.

What do you say @ThinhDinh or @Jeff_Hager?

Hey @Zebest you may add a formula in Google sheet creating a data validation for Old Age. Whenever age is greater than 60 it will be marked as True and will than reflected in Glide app. But this feature might work only if you are using Pro app have Google sheet automatic updates in Glide App.
Else i guess @Santiago_Perez1 has shared best possible solution.

I have questions:

  1. Is this on a form?
  2. I assume the user would be filling out this form multiple times?

I could see this with multiple visibility conditions on the component. Set up a condition to show if the age is greater than or equal to 60 and show if a hide value is set to not true. You could have the user set that value in a user profile screen and then pull it from the user profile when setting the visibility condition. Otherwise you could maybe set up a relation and rollu, on the sheet that contains the form button, to look for the true value in the form response sheet. Then possibly access the value from the rollup in the form to set the condition. All depends on your flow.

Thanks everyone - I guess the easiest way is to get the pro version. If anyone comes up with a simple way let me know.
Thanks again to everyone for the help.