Hey, trying to add a security filter so that ...

Hey, trying to add a security filter so that only the user can see a table if their name is one of the values in a column.

I tried this, but it does not work.

(CONTAINS([Assigned]) USERNAME())

any suggestions? the thing is that I want to be able to add multiple users to a row. ie. user1, user2

etcโ€ฆ

Thanks!

0 6 405
6 REPLIES 6

There is two solution; 1 you must create USER TABLE with NAME and to use LOOKUP with โ€œifโ€ rule OTHERWISE in your table you could us OR(USEREMAIL()[ASSIGNED], "2ยฐ USEREMAIL ETC,) but in this case you must to insert the 2ยฐ and the 3ยฐ in the formula

Thanks Mark. I have changed the column type to a Enumlist, and have it โ€œValid ifโ€ to another table with the list of technicians. Is there a way to add a security filter so only the User sees the rows which have his USERNAME in the column?

Hi @Potentia_Solar, Could you please mention what challenge you are facing with the security filter expression (CONTAINS([Assigned]) USERNAME()) ?

Generally this expression seems to be workable.

However, I believe

you may wish to evaluate use of USERNAME() in expression. It is recommended to use USEREMAIL() instead of USERNAME(), as some authentication providers may not return the USERNAME().

help.appsheet.com - USERNAME() USERNAME() help.appsheet.com

@Suvrutt_Gurjar thanks for the reply.

I get the error โ€œCONTAINS function is used incorrectlyโ€.

I use the USERNAME() function in other areas of the app with ease. the provider is Microsoft

@Suvrutt_Gurjar

Thanks. That worked!

Hi @Potentia_Solar,If you are using the same expression as you have given in this post in app,then I believe it has syntax errors.

Could you please try the following expression

CONTAINS([Assigned], USERNAME())

Presume [Assigned] is LIST or TEXT type column.

Top Labels in this Space