cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

Multiple users to be added to Displaymode.Edit?

Hello

 

I'm trying to add multiple users to a "Displaymode.Edit" function but can't seem to get it to work properly.

 

I had single user as follows:

 

If(VarUser.Email = "User1's email", DisplayMode.Edit, DisplayMode.View) - This worked fine.

 

I then tried to add another user as follows:

 

If(VarUser.Email = "User1's email, User2's email", DisplayMode.Edit, DisplayMode.View) - This did not work.

 

I then tried multiple different varieties of the above to no avail such as:

 

If(VarUser.Email = "User1's email" Or "User2's email", DisplayMode.Edit, DisplayMode.View) - This also did not work.

 

Can someone point me in the right direction please?

 

I don't think this makes a difference but this is relating to a customized Sharepoint form.

 

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Resolver I
Resolver I

hi,

 

Change your If syntax to this-

 

If(Or(VarUser.Email = "User1's email, VarUser.Email = User2's email"), DisplayMode.Edit, DisplayMode.View)

 

OR

 

If(VarUser.Email = "User1's email || VarUser.Email = User2's email", DisplayMode.Edit, DisplayMode.View)

 

Hope this helps.

 

 

View solution in original post

2 REPLIES 2
Highlighted
Resolver I
Resolver I

hi,

 

Change your If syntax to this-

 

If(Or(VarUser.Email = "User1's email, VarUser.Email = User2's email"), DisplayMode.Edit, DisplayMode.View)

 

OR

 

If(VarUser.Email = "User1's email || VarUser.Email = User2's email", DisplayMode.Edit, DisplayMode.View)

 

Hope this helps.

 

 

View solution in original post

Highlighted

Thank you @DanishIslam

 

I knew it was going to be relatively easy but I just couldn't work it out.

 

Thank you so much!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (8,401)