Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building 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:
  • Verified answer
    Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at
    Re: Show button in a gallery only if logged in user is eq to "assigned to" list field

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

     

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

  • PriyankaGeethik Profile Picture
    3,320 Super User 2024 Season 1 on at
    Re: Show button in a gallery only if logged in user is eq to "assigned to" list field

    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
    CU-18081211-6 Profile Picture
    9,266 Super User 2025 Season 1 on at
    Re: Show button in a gallery only if logged in user is eq to "assigned to" list field

    @xxYYxx ,

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

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

     Hope it helps !

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,601 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,942 Most Valuable Professional

Leaderboard