Hi community! How can I filter the data for ...

security
(Aparicio Piñeyrúa) #1

Hi community!

How can I filter the data for each user thart operates with the same App? Eg: I had 2 Master locations, for each master locations I had several sub-locations. For the users, I create a user table that identifies each user with there email to there beloging mother location and the sub-location.

Witch formula could I use to filter the data that belongs to each users depending on the mother location and the sub-location?

I am asking for a general formula that I could enter in the security filters tab in the editor.

Many thanks!

Apa

(Reza Raoofi) #2

Generally speaking assuming the table that you want to filter has a column named [Location], and you also have the same column in Users table, then entering an expression like this in Security Filter should do the job:

[Location]=LOOKUP(USEREMAIL(), “Users”, “Email”,“Location”)

(Aparicio Piñeyrúa) #3

@RezaRaoofi

Hi Reza how are friend?! Thanks! I will try!

(Aparicio Piñeyrúa) #4

@RezaRaoofi It is partialy working. It only shows me the data for a particular Location ([Centro] = cell “Centro 1”) and not for the other

locations. Here is a pic about the useremail and the related locations (Location 1 = "[Fundación] an sub-location = [Centros]) The email is the same USEREMAIL[email] for each row. In Users table I had a computedkey (email.Centro)

(Reza Raoofi) #5

Ok then; if you have multiple rows with different locations for each user in Users table, then you could change the formula to something like this:

IN([Location],SELECT(Users[Centro],[email]=USEREMAIL()))