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!
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.
WarrenBelz
146,651
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,999
Most Valuable Professional