Conditional button based on user

I’d like to conditionally show a button based on who the user is. I’m interested to have different membership levels to my app, and have different levels have different permissions to take actions.

I know there are a couple other conditional button topics, but these don’t seem to address the case I’m interested in.

I also know there are a few topics about making entirely separate views within the app for different membership levels. But that seems a bit cumbersome to have to maintain a few copies of the same functionality in the app with slightly different functionality.

The only way I can see this working is for the user to be brought to a detail style layout with per user data, so each user would have a row in a sheet. Then in that sheet, you would use formulas to control an image URL in the sheet. With that you can set up an image component to link to a screen. If the URL is empty for that user, then they shouldn’t see the image button.

Take a look at the Onboarding example in
I don’t use images for buttons, but I think the concept would be the same.

1 Like

Hm, interesting. Okay, I’ll play around with this and see if it works for me. These items are in a list of many items, each of which many members have access to, but I’d love for members to each have different levels of abilities on the items.

1 Like

I don’t know if this helps in your case, but here is some more information that might help or give you ideas:

1 Like

Cool thanks for the ideas! I’ll play around with this stuff and let y’all know if I have more questions

1 Like

We don’t support this easily yet, but we plan to improve conditional visibility of elements next year.

1 Like

Thanks David, will that include conditional visibility of tabs? Cheers :beers:

That would also make a lot of sense and many people have asked for it. We’ll certainly consider how to do it.

1 Like

Cool, to my simple brain, spreadsheet assigned to tab with a list of emails who should have access. The tab can still appear if you want, when user accesses tab the data is blank with a button. We can then decide what the button does. Don’t need to over complicate it. The button could do one of these.

I threw together an example to Show/Hide an image button in . It’s working using formulas in the sheet, but I couldn’t get it to work using the IF-THEN-ELSE column in the Data tab. See if it would work for your situation.
I tried using the new IF-THEN-ELSE column to get the column value to equal the image URL, It works, but I still get an empty image placeholder that is clickable. I’m guessing Glide is still placing some sort of value in the virtual column that isn’t truly a blank value. Instead I’m controlling this in the sheet. It’s a little slower to update, but the image button shows/hides depending on the value in a different column. Hope that helps.