cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
A-IT
Resolver I
Resolver I

Visibility code based on multiple emails

I'm trying to make certain buttons / labels / galleries only visible to certain users. One user is easy:

fx = If( User().Email = xxxx@domain.com, true, false)

I'm having issues with attempting to do it for multiple users. I've tried

fx = If( User().Email = xxxx@domain.com, true, false,

If( User().Email = xxxx@domain.com, true, false))

 

as well as:

If( User().Email = "xxxx@domain.com", true, false,
Or(If(User().Email = "xxxx@domain.com", true, false)))

 

Both will display my for me and display the message: Text fx = "You should be able to see this " & User().FullName

 

I'm sure I'm making a simple mistake for the multiple users. If you know how to extend it out for 3 - 5 users, that would be helpful as well! Thank you for the assistance!

1 ACCEPTED SOLUTION

Accepted Solutions
A-IT
Resolver I
Resolver I

Figured out the switch function is much easier to use.

 

Switch(User().Email,
"user1@domain.com",true,
"user2@domain.com",true,
"user3@domain.com", true
)

 

Add users as necessary 

View solution in original post

1 REPLY 1
A-IT
Resolver I
Resolver I

Figured out the switch function is much easier to use.

 

Switch(User().Email,
"user1@domain.com",true,
"user2@domain.com",true,
"user3@domain.com", true
)

 

Add users as necessary 

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (30,196)