cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Lubeno78
Helper I
Helper I

DisplayMode Bug?

Hi,

 

I want to disable the button according to user name of currently logged-in user.

I'm using this formula: 

If(Office365Users.MyProfile().DisplayName = "name1" || "name2" || "name3" || "name4", DisplayMode.Edit, DisplayMode.Disabled)

 

Syntax of my formula seems to be o.k. (at least shows no errors), but it always work only for first user in my formula. When I put "name1" into the end of formula like:

If(Office365Users.MyProfile().DisplayName = "name2" || "name3" || "name4" || "name1", DisplayMode.Edit, DisplayMode.Disabled)

 

...then it works only for "name2". 

Names 1, 3 and 4 see the button in Disabled mode.

 

I've tried with User().FullName too, but same results.

 

Do I have something wrong in my formula?

Can someone help me?

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
CNT
Super User
Super User

@Lubeno78 

Please try the following,

If(Office365Users.MyProfile().DisplayName in ["name1", "name2", "name3", "name4"], DisplayMode.Edit, DisplayMode.Disabled)

 

Please remember to give a 👍 and accept my solution as it will help others in the future.

View solution in original post

3 REPLIES 3
CNT
Super User
Super User

@Lubeno78 

Please try the following,

If(Office365Users.MyProfile().DisplayName in ["name1", "name2", "name3", "name4"], DisplayMode.Edit, DisplayMode.Disabled)

 

Please remember to give a 👍 and accept my solution as it will help others in the future.

Lubeno78
Helper I
Helper I

@CNT : Thank you very much !! This works great !

@Lubeno78 

Glad to help!

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,537)