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
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
189 | |
66 | |
45 | |
42 | |
20 |
User | Count |
---|---|
244 | |
120 | |
83 | |
74 | |
69 |