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

Notifications

Announcements

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard