Security filter

hi, I have this formula in the security filter of  a table "IF(CONTEXT("VIEW") = "PLP PRODUCTOS", AND([PROD_PUBLICAR] = "SI", [USR_MAIL] <> USEREMAIL()), [USR_MAIL] = USEREMAIL() )", but the "CONTEXT("VIEW") = "PLP PRODUCTOS" always result False even thow the view "PLP PRODUCTOS" is display.

The CONTEXT("VIEW") = "PLP PRODUCTOS" is also used in a show if and it works perfect, but in the security filter always is false

 

thnaks for the help

Solved Solved
0 9 232
1 ACCEPTED SOLUTION

In the formula to call the column of user settings write "Usersettings(TheNameOfTheColumnWitOut Brackets)" Or "[_Thisuser].[TheNameOfTheColumn]".

View solution in original post

9 REPLIES 9

Security filters are applied on the server side. And the server is unaware of the view being seen by the user. So I believe you cannot use CONTEXT() functions in the security filters.

Improve the speed of Sync - AppSheet Help

CONTEXT() - AppSheet Help

Relevant excerpts from the articles.

Suvrutt_Gurjar_1-1668324442905.png

 

Suvrutt_Gurjar_0-1668324319027.png

 

Thanks for the answer, so the only way is to create another table with different name and create the security filter to each one, and use with each view

Explain us what you're trying to do and we will try to help you.

I need to fiter the table depemdimg the view that is displayes, I don´t want to make a slicer because of performance, don´t want to bring from the cloud all the table, only the rows I needed

Try this way, use the user settings. After the user logs it hase to chose the view and the app will do the rest.

In the user settings set a column "view" with enum ( in the enum set a list of your views ).

After that set a formula depending on the view chosen by the user. 

I don't know what your table contains to help you describing with the formula.

Thanks Ceke, but the user can select diferent views in the same session, that will work?

Yeah the user has just to go in user settings, change the view to download and the app wil recalculate the formula and change the data.

 

THANKS

In the formula to call the column of user settings write "Usersettings(TheNameOfTheColumnWitOut Brackets)" Or "[_Thisuser].[TheNameOfTheColumn]".

Top Labels in this Space