Regarding visibility condition for components, it seems Glide only has “A and B” or “A or B” capabilities but doesn’t have "A and (B1 or B2) !! Such capability is already available in DB editor so the difficult part is already done, it’s just a matter of enabling across the board.
Right. What I do is build in the OR logic in the data editor. Then use AND logic in the visibility settings.
Create an if-then-else column called ifRole. Create two statements:
- if Role is Admin then TRUE.
- if Role is Operator then TRUE.
In the visibility, show component when Element is Departments AND ifRole is TRUE.
Thanks Robert. I am regretfully doing this
Actually, I have 10 roles, and 35 elements so there is this huge permission matrix roles across the various elements. Can you imagine how many OR logic in the data editor will be required to satisfy needed combinations! Bringing this flexibility to the component level would bring us out the stone age.
Hello @adelhammoud,
I am wondering if you might be able to leverage the sheet for this rather than the glide logic. You could create a user specific column for each location a complex sort is required and create a function in that column of the spreadsheet that simply spits out booleans. Then when you show the list in glide, you simply filter based off the boolean column in sheets.
Even if you needed to make a few of these columns (sort Home, sort Admin, Sort Dept) etc, it may be faster and easier than doing the above.
I welcome any feedback or further discussion and look forward to hearing how it went!
Thanks for the tips - but my strategy is keep google sheet as minimal as possible (just host raw data) where all the logic and intelligence to be handled in Glide engine.
Why ?
- Much faster
- If Glide decides to connect to SQL DB’s in the future (for example), migrating your App will be a straight forward (especially if it’s live out there and 100’s of people are using it).