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 / Get Records that have ...
Power Apps
Answered

Get Records that have current user in Column

(0) ShareShare
ReportReport
Posted on by 4

I have a SharePoint list that contains a list of Customers and the Salesperson assigned to each customer.  I want to populate a dropdown with the customers assigned to the current user.  I have tried the formula below, but I keep getting the error "The property expects table values, but this rule contains incompatible text values.".

 

This is the formula I have used.

 

LookUp('CUSTOMER (TEST)',User().FullName=Salesperson,Name)

 

I have also tried putting the Saleperson name in the formula like this and get the same error.

 

LookUp('CUSTOMER (TEST)',"John Doe"=Salesperson,Name)

 

Here are the columns in my Sharepoint list

 

Name  Address1  Address2  City  State  Zip  Salesperson

 

Anyone have any idea how I can accomplish this?

Categories:
I have the same question (0)
  • Verified answer
    Steelman70 Profile Picture
    873 on at

    Try this...

    MyDropDown.Items = ShowColumns(Filter('CUSTOMER (TEST)', User().FullName=Salesperson), "Name")

     

     

    PS You may want to put User()FullName in a context variable or in a textbox since otherwise there will be a call to detect the current user every time the function is called.  This will affect performance 

  • Graves_7 Profile Picture
    4 on at

    Thank you...worked like a charm!

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi Steelman70,

     

    I've a simular filter based on User().Email to filter a datasource (cdm, ~3000 records) to only show the records of the current user. This is extremely slow (minutes) and returns only findings from the first 500 records 

    Although not an acceptable solution, if I replace the User().Email with text of an actual email the retrieval time is acceptabel and it retrieves all records that comply with the filter. 
    The solution given in this thread, using a context variable that in my case has the value of User().Email is not an option  ( I think.. ) but do you have some other suggestions?

     

    Regards Peter

  • Steelman70 Profile Picture
    873 on at

    Hi Peter,

    you can use a context variable or you can have a text box (and hide it) with the User().Email as text property.  Then the filter can refer to the context variable or the text box's text value.  Either of these approaches should improve performance significantly.

    I am surprised that you only get results from the first 500 records, as delegation with CDM should work.  In any case CDM will change in the next few days (see this announcement) so things may change in that front.

    Please let me know if this has worked or if you need more details or clarifications.

    Regards,

    Giacomo

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks. It did work.. As workaround made a first screen to retrieve the email in a txtbox, and a button to navigate to the screen that has the results of the filtered datasource . 

  • LUNA24 Profile Picture
    98 on at
  • LUNA24 Profile Picture
    98 on at
  • LUNA24 Profile Picture
    98 on at
  • LUNA24 Profile Picture
    98 on at
  • LUNA24 Profile Picture
    98 on at

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 329 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 179

Last 30 days Overall leaderboard