cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
garrettl
Frequent Visitor

Conditional Visibility based on multiple users emails

Hello,

 

I am trying to set a button to be only visible for certain admin users. On start up of the app I set varUser:

 

Set(varUser,User());

 

In the button is where I have  the visible setting with:

 

varUser.Email = "user1@email.com" Or "user2@email.com" Or "user3@email.com"

 

 

This function recognizes the first email and allows the button to be visible to the first admin listed, but user2 and user3 admins are not able to view the button. Please help, I've tried using:

|| instead of Or
but this does not work.

1 ACCEPTED SOLUTION

Accepted Solutions
Pstork1
Dual Super User III
Dual Super User III

You can't just OR the values.  You have to OR the whole equation.

if(varUser.Email = "user1@email.com" Or varUser.Email = "user2@email.com" Or varUser.Email = "user3@email.com", true, false)


-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

2 REPLIES 2
Pstork1
Dual Super User III
Dual Super User III

You can't just OR the values.  You have to OR the whole equation.

if(varUser.Email = "user1@email.com" Or varUser.Email = "user2@email.com" Or varUser.Email = "user3@email.com", true, false)


-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

garrettl
Frequent Visitor

Yes this works! thank you for the help

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,463)