Button visibility

Hi there,

I am new here, it is my first topic, and first of all I wanted to congratulade Glide team ! It is an awesome job what they have done !

My project :

I have question, and I want people to vote on different choices.
So in a question, I have create a “FORM” button that I have called “VOTE” and that displays “CHOICE” list.

I want user to be able to vote JUST ONCE.

However I cannot figure out how to make the button invisible when the user has already voted once.

The idea that I have explored :
In my google sheet I have a tab for que questions, and a tab where I collect the votes.
I was able to create a “relation table with multiple” between those two and a “lookup” to see “who has voted” (email) for each question.
I wanted to say something like IF “Who has voted” contains “Current User”, make the button “Vote” invisible. But I was no able to go to the end of this idea.

Please help.

Thank you

1 Like
  1. Public with email
  2. Make a tab use ‘unique’ function to app login sheet for take the email.list of user then make a ‘vote’ colomn
  3. Make a button ‘open to screen’ that open the unique email list tab
  4. Setting vote from choice, it can just vote one
    May it help you

Basically what @Muhammad_iqbal said, you will need a sheet with a list of all unique users that you can build off of the app:logins sheet. This is the sheet that the user will view in detail style view with per user email filtering turned on. They will only see their own record. Here you can create the relation (non-multiple) and lookup columns. The lookup column can be used to set visibility on the form button. If the lookup value is empty, then show the button. Otherwise it is hidden and they can’t vote.

Hi thanks so much for the inputs

I am not sure I understand it correctly, I feel it cannot work since the vote button is not in a screen that is e-mail filtered.

Maybe it would make more sense if you have a look at the app :
https://ryoya.glideapp.io/

Thanks a lot

I can’t think of a way to hide the button with the current way you have app set up. I would love it if we had access to the user’s email for visibility or filters so we could use it in a contains comparison or something like that. It would be easy to use a relation and lookup to get a list of emails from users that have voted, but there is no way to compare if the current user is in that list. I see in staging that they have a new filter and visibility option to filter by logged in user or not. Looks like it might be a replacement for the existing per user filter. Unfortunately it doesn’t seem like it works for an array list of emails at this time. It will be interesting to see what it becomes when it’s released.

1 Like