CHOICE component by User (Users Conflicting with Each Other?)

I’ve added a CHOICE component that drives some MATHS calculated fields in the database for a user. So changes the values reported when they change their CHOICE.

I SEE 2 POTENTIAL ISSUES:

A) If 2 or more users are on the same page in the App could they interfere with the results by making Choices at the same time? Can Glide handle this and keep the user choices / and math calculations separate?
B) Resetting the Default: I’ve set the default value to “1”, as it should always start out as for anyone entering the page. The CHOICE field of course modifies this, to say 2, if a user selects it. However, I need it to go back to 1 after the user has finished with the page so that the next user starts with ‘1’. And doesn’t get confused. Is there a way to have CHOICE reset to DEFAULT for next user?

Hopefully this makes sense. I’m not sure if both or either of these are issues, as it would depend on how glide runs calculations.

What is your specific use case here, may we know?

@qb15,

If you store the choice box value in either a user specific column or a column in the user sheet which has row owners turned on there should be no conflict. Each user will have their own ‘version’ of the choice column and they will not overlap. Even if every user is there at the same time (even if you are using a password protected app using a user specific culumn should require users to sign in prior to interacting with it).

If you absolutely do not want the user to have to log in, then you are correct and the users choices can overlap. There would be no way to mitigate this without some sort of user differentiation unfortunately.

As to your question about resetting the value, it is only possible through appscripts and even then it would be difficult to detect where the user was in the app navigationwise to trigger the reset. However if each user uses this choice only once then you wouldn’t need a reset as each user gets their own.

Also for default value I just responded to another one of your posts, please take a look.

The issue with the reset is there is no way to use functions to do the reset in glide and in sheets would likely end up with a circular reference which in my experience do not always show up correctly in glide, due to the iterative nature of the calculations and refresh rate of glide.

Hopefully the above helps, please let me know if you have any questions.

Good luck!

I was thinking if you can have a user-specific reset value column.

  • User value choice is 1 column
  • Reset increment = -1*(User value - 1)
  • Button increment set to increment is “reset increment” value.

If the user value choice is 3, for example. The reset increment would be -1*(3-1) = -2. The increment button would get it back to 1 in one click.

@qb15,

Were you looking to have the user reset the choice? Issue with the above @ThinhDinh is that you now depend on the user to reset their own which is unreliable. Also I feel as a user it would not be the best user flow to have to reset something in an app manually, personally I could never be bothered to do this as its something the app should take care of for me, but that’s just me.

From my understanding of the question @qb15 wanted the reset to happen on the navigation away from page automatically.

As you have stated above as well, there’s no way to do that on a navigation.

But I need to know more about his flow. Why would a user-specific column overlap each other on a public app? It’s stored temporarily on the device’s session. Sorry if I catch that wrong.

User specific columns will work with a public only app and a password only app. There is no need to sign in. The only difference is that the user specific values are stored temporarily on the user’s device instead of being stored on the glide database. Once the user closes and reopens the app, the user specific values are cleared out. Only when email sign in is required, the values are saved in the glide database and available across devices for that user. In either case, you can use user specific columns with any of the sign in options.

If the app is public or password, then there really shouldn’t be a need to set the default value as closing and reopening the app (and the use of user specific columns) will reset the choice component value to blank, forcing the user to make a selection again. This would never conflict with other users.

1 Like

Do i need user specific columns for the same case if i my app privacy is allowed email list?

If your users interact with the same component then yes.