Hello all. I am trying to filter what differ...

(Miranda Lubarsky) #1

Hello all.

I am trying to filter what different employees can see in the app.

Specifically I would like one crew to see only certain views and not others.

First question: is it possible to filter views, not just tables?

I am only seeing a security filter field in the table area.

However, I have some forms that use the same table, but I want one crew to see one form and not the other.

So if I can only filter the table and not the view, I don’t think what I’m asking is actually possible.

I know I could clone the app and make different apps for each crew, but I don’t want to have to regenerate and update multiple apps all the time.

This would be too much of a time suck for me during our busy season.

Second question: when putting an equation into the security filter (right now in a table), if I use the expression “Employees[Maintenance Crew Emails]” am I telling app sheet to SHOW it to the Maintenance Crew or NOT show it to the maintenance crew??

This is unclear to me.

Am I even using the correct expression/equation?

Also, how do I test the app to see if the table or view is actually hidden to that crew?

Thank you for your assistance! Miranda

(Levent KULAÇOĞLU) #2

Hello @Miranda_Lubarsky Q #1.) I believe with the word ‘form’ you wanted to mention ‘UX View’. UX views have a Show_if property if you expand it’s settings box to see more properties. You can use this property to show/hide UX views as per expression you set.

Q #2.) Security Filter expressions shall always evaluate to a Yes/No value. Therefore, your expression is not correct. Instead, the expression should be:

=CONTAINS(Employees[Maintenance Crew Emails], USEREMAIL())

Above expression will result with a Yes or No value, regarding if the user’s email address is residing in Employees table, [Maintenance Crew Emails] column or not. If the eval is Yes, the use will be able to access the table.

To test if the table/view is actually hidden from the user; you should log in with that user’s email address to you app. But if you test your expression in the Expression Builder after you have verified it, the result of the expression will give you an idea about it.

Hope my reply is explanatory. Please do not hesitate to ask more provided you need further help and/or explanation.

(Levent KULAÇOĞLU) #3

@Miranda_Lubarsky, I believe below help pages and material might also give you the overall idea:

appsheethelp.zendesk.com - Limiting users to particular tables, views, and actions



https://www.youtube.com/watch?v=tkJhVgvj1ak Limiting users to particular tables, views, and actions appsheethelp.zendesk.com

(Miranda Lubarsky) #4

@Levent_KULACOGLU Thank you !

I had read that first link that you send, but the language was confusing to me even after reading it several times which is why I put my question up here.

The way you explained it has clarified everything to me.

So to clarify, if I wanted to exclude (ie. prohibit) the Maintenance Crew from seeing that particular view or table, the equation would be =DOESNOTCONTAIN(Employees[Maintenance Crew Emails], USEREMAIL())

Is that correct?

(Levent KULAÇOĞLU) #5

@Miranda_Lubarsky correct expression should be:

=NOT(CONTAINS(Employees[Maintenance Crew Emails], USEREMAIL()))

(Levent KULAÇOĞLU) #6

@Miranda_Lubarsky If you want to negate any expression, you should be using NOT logical operator. The above expression will evaluate to No/False if the useremail is recorded in Employees table [Maintenance Crew Emails] column, yielding your Show_if or Security Filter eval to FALSE and will hide the table/view from the users whose email address in in that column.

However, I believe the best approach will be designing/contructing a ROLES table, where you can assign roles/privileges to each specific useremail (and you can even group them) and then write a bit more complex expression to read that access permission value. Let me show you what I mean. See attached img.

(Levent KULAÇOĞLU) #7