Hi,
How do I make a formula in a security filter so only the rows with the location where the useremail is equal to the value in [name] are visible.
Please provide formula, all I tried did not work.
|key| company| location | name | crop nr| local staff|
It’s a simple pattern which matches against the currently-logged-in email address. You will want to use the “preview as” feature to test one the following emails:
I have a sheet with a data tabel, data about wich company is connected to wich useremails.
When a filter with email adresses is usedlike you suggest, then with every change in company or useremail the formula has to be adjusted with the new useremail.
I have read help pages, they suggest to use security filter to filter rowdata, much safer and much faster in downloading data from cloud to the device.
But wich formula to use in the security filter to filter allow username belonging to the companies ?
Use this formula just as we wrote it, with nothing in the brackets () , and change nothing else. The formula gets the email that is used to be loged in on every device.
You don’t have to write email adresses.
So on my phone , formula with get my email , on your it will get your email.
yes when the username is equal to the name in the row it works like you suggest, useremail will only see useremail rows…
But in my case the company is leading looking from other tables to the example table.
So when a user is logged in, then this user will of all tables see rows of companies only when in the example tabel the company is on the same row as the useremail() in column [name].
So the security filter formula has to look in the example table in the column [useremail], to compare username() then compare with column [company] to compare company, result of security filter in all other tables must be all rows of column company were [username] equals username() in the example tabel.
I tried this now in the security filter:
and ( IN([company], LIST(company[company])) , IN(useremail(), LIST(company[name])))