I have a gallery to which I added a Delete Icon, and I would like to only show that icon if the current user is the creator of the item.
For these I create a variable OnStart:
Set(
currentUserName,
Office365Users.MyProfile().DisplayName);
Then I added this to the Visible property for the icon:
If(IsMatch(currentUserName, ThisItem.'Created By'.DisplayName,MatchOptions.Complete), true, false)
I also tried:
If(IsMatch(currentUserName, ThisItem.'Created By'.DisplayName,MatchOptions.Contains), true, false)
I get a "Regular Expressions Must Be Constant Values" error message. Is there a better way to accomplish this?
Thanks in advance.
Solved! Go to Solution.
Hello !
Can you try this formula in the icon's on visible property
If(ThisItem.'Created By'.DisplayName=currentUserName,true,false)
I made a test and this should work
Thanks
Hello !
Can you try this formula in the icon's on visible property
If(ThisItem.'Created By'.DisplayName=currentUserName,true,false)
I made a test and this should work
Thanks
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
181 | |
46 | |
46 | |
34 | |
33 |
User | Count |
---|---|
259 | |
87 | |
79 | |
68 | |
67 |