Hi, I'm trying to hide/show some views depend...

expressions
(Fer Calvano) #1

Hi, I’m trying to hide/show some views depending on a value in the users table.

I’m in the UX part and in the “show if” box I added following expression as a YES/NO

LOOKUP(USEREMAIL(), 02_USERS.XLSX, UserEmail, Ventas) = True

But by using this the view is shown no matter which is the content of the table.

How should I write the expression?

Thanks!!

(Aleksi Alkio) #2

If your “Ventas” column is an Y/N type, your original formula should work as well. If it’s not working, the reason is somewhere else.

(Suvrutt Gurjar) #3

Also as @Aleksi_Alkio guided , the expression LOOKUP(USEREMAIL(),02_USERS.XLSX,UserEmail,Ventas) works perfectly instead of need for LOOKUP(USEREMAIL(), 02_USERS.XLSX, UserEmail, Ventas) = True

Hi @Fer_Calvano, As guided by Aleksi, for this expression to work , ,please use Yes/No type of column instead of Enum type with Enum values

Yes/No.

(Aleksi Alkio) #4

@Suvrutt_Gurjar You can think the option Show_If like this… It will hide that menu name, but not the view itself.

(Suvrutt Gurjar) #5

Yes, you are right @Aleksi_Alkio

(Fer Calvano) #6

Thanks to both!

(Fer Calvano) #7

Hi, I’ve tried with your suggestion but it is not working…maybe the mistake is somewhere else. Thanks!

(Aleksi Alkio) #8

What happens if you try just… LOOKUP(USEREMAIL(),02_USERS.XLSX,UserEmail,Ventas)

(Fer Calvano) #9

my views have “go to view” behaviour… could this be an issue?

(Fer Calvano) #10

Hi, @Aleksi_Alkio I’ve now changed the Ventas column to Enum, allowing “SI” or “NO” as options. If I run the formula, the answer is “NO”,

but the view is displayed.

Thanks! Fernando

(Fer Calvano) #11
(Fer Calvano) #12
(Suvrutt Gurjar) #13

Hi @Fer_Calvano, A couple

of updates after I did testing based on @Aleksi_Alkio’s guidance and your inputs. You had mentioned that you have “go to a view” behavior in your views.

My testing indicates that if you have a view called say A , you can use the “show_if” condition for that view to block a user from seeing the view FROM MENU or Bottom Header.

However further testing showed was if you call this view A through an action type of “Go to a view”

from another view B,

the view A

is visible through action button to an user even if the user is blocked for that

view A from “show_if”

condition of view.

Hope this helps.

(Suvrutt Gurjar) #14

Hi @Fer_Calvano, A couple

of updates after I did testing based on @Aleksi_Alkio’s guidance and your inputs. You had mentioned that you have “go to a view” behavior in your views.

My testing indicates that if you have a view called say A , you can use the “show_if” condition for that view to block a user from seeing the view FROM MENU or Bottom Header.

However further testing showed that if you call this view A through an action type of “Go to a view”

from another view B,

the view A

is visible through action button to an user even if the user is blocked for that

view A from “show_if”

condition of view.

Hope this helps.

(Suvrutt Gurjar) #15

Hi @Fer_Calvano, You may wish to try the following

In the Ventas column ,please use words like “Allow” or “In Team” when you wish to allow the View to be seen by user and say “Disallow”

or "Out Team"when you do not wish the user to see the view.

Please modify the expression accordingly, LOOKUP(USEREMAIL(), 02_USERS.XLSX, UserEmail, Ventas) = “Allow” or

LOOKUP(USEREMAIL(), 02_USERS.XLSX, UserEmail, Ventas) = “In Team”

The above expression will allow the user to see the views when Ventas column is “Allow” or"In Team" against their names.

Hope this helps.