I got a strange message when I tried to appl ...

(David Joyce) #1

I got a strange message when I tried to appl a security filter:

“The filter expression cannot reference the table being filtered”

What??? The expression is valid and passes the basic check. Can someone please explain how we apply security filters to data without referencing the data? Thanks in advance

LOOKUP( UserSettings(UserID),

User, Email, OU) = UserSettings(Org Unit)

(Aleksi Alkio) #2

Have you tried to use just [OU]=UserSettings(Org Unit)?

(David Joyce) #3

@Aleksi_Alkio That expression you gave works, thank you very much. But I need to check that the records with the same Org Unit as the UserID Org Unit come back. A valid user in one department should not be able to see stuff from a different (but valid) department?

(Aleksi Alkio) #4

Would you please open your table structure a little. For example what table you are trying to filter and what columns that contains.

(David Joyce) #5

@Aleksi_Alkio Table is called “User” and it has four(4) columns: “Email”, “Name”, “Admin?”, “OU”. The [Email] column contains a unique id that identifies the user, and the [OU] identifies which organisational unit that user belongs to. The organisational units and their data are completely independent of each other. I wanted to use security filters so data for other units does even get downloaded to the users device. And the filters work for other tables, but obviously self-reference on the User table isnt going to work.

(Aleksi Alkio) #6

It sounds that you are trying to set the security filter for another table than the user table. Correct?