web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Show button in a galle...
Power Apps
Answered

Show button in a gallery only if logged in user is eq to "assigned to" list field

(0) ShareShare
ReportReport
Posted on by 79

Hi all, 

I want to display a edit button in a gallery only if the logged in user is the same as the assigned to value within the SharePoint list behind. 

I store the user in a variable at "on start".

I "Visible" property look for the button looks following:

If(varLoggedInUser = ThisItem.'Assigned to',true)

 

The error message is something like:

Can´t compare text with records. 

 

So I know what the problem is but I don´t know how to solve it. 

Does anybody of you has a solution?

 

Categories:
I have the same question (0)
  • Verified answer
    CU-18081211-6 Profile Picture
    9,270 Moderator on at

    @xxYYxx ,

    Assuming that 'Assigned to' is a People type column, use on Visible property:

    varLoggedInUser.Email = ThisItem.'Assigned to'.Email

     Hope it helps !

  • PriyankaGeethik Profile Picture
    3,320 Super User 2024 Season 1 on at

    Hi @xxYYxx , 

     

    Could you please share the assignment of varLoggedInUser and Gallery items property because it seems you are comparing text value with record. 

    If Assigned to is people picker column chances are it will be a record. 

     

  • Verified answer
    Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    Hey! you just to check if the variable is the same of that item Assigned To.Email

     

    Something like: var.Email = ThisItem.AssignedTo.Email

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 638

#2
Haque Profile Picture

Haque 317

#3
WarrenBelz Profile Picture

WarrenBelz 315 Most Valuable Professional

Last 30 days Overall leaderboard