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 coupleother 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 https://concepts.glideapp.io/
I don’t use images for buttons, but I think the concept would be the same.
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.
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 https://concepts.glideapp.io/ . 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.