Show/Hide Button based on Current User Matching person Type-Column in a Gallery
Is it possible to make a button that is placed in a gallery only to be visible for the current user if the user Matches the person/ Group Type-Column in the SharePoint list?
In my Power App, I need a button in my gallery to only be visible if the logged-in user is set to be the "Approver" in a people or Group Type-Column in SharePoint. So this variable will vary based on who is responsible for each record.
I have tried these formulas in the On Visible property, with no luck:
Filter(SPList;Lower(ThisItem.Approver.DisplayName)=Lower(User).FullName))
Filter(SPList;Lower('Approver'.DisplayName)=Lower(User().FullName))
If(User().Email in searchApprover_1.SelectedItems.Email
CountRows(Filter(SPList,User().Email in Approver.Email ))
Any suggestions?
Solved! Go to Solution.
I would personally use the email address. It has to be absolutely unique whereas Names don't.
So if you are using the built in person field then your formula should look something like this:
If(
User().Email in ThisItem.Approver.Email,
true,
false
)
I would personally use the email address. It has to be absolutely unique whereas Names don't.
So if you are using the built in person field then your formula should look something like this:
If(
User().Email in ThisItem.Approver.Email,
true,
false
)