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 / Using Lookup for peopl...
Power Apps
Unanswered

Using Lookup for people picker control

(0) ShareShare
ReportReport
Posted on by 4

I have a form where based on ID entered in a textbox (DataCardValue1), i need to extract the employee display name from another sharepoint list and show it up on the people picker field. I am trying to do a Lookup but i am unsure of the syntax. Please help.

Here is the code i am trying to write in default 

LookUp(SP DB,DataCardValue1.Text='ID').Employee

Categories:
I have the same question (0)
  • BCBuizer Profile Picture
    22,505 Super User 2025 Season 2 on at

    Hi @Sandeeprao8 ,

     

    Your syntax seem correct.

     

    There is an alternative, but it's up to you to pick a way that suits your style:

     

    LookUp(SP DB,DataCardValue1.Text='ID',Employee)
  • MVP-Phipps Profile Picture
    3,508 Super User 2024 Season 1 on at

    @Sandeeprao8 , Do you get an error?

     

    Either of the following would work:

     

    LookUp(SP DB,DataCardValue1.Text='ID',Employee)

     

     

     

    LookUp(SP DB,DataCardValue1.Text='ID').Employee

     

     

    Please Accept as Solution if it solves your question. Or just give it a Thumbs Up if it is helpful because this can help others.

    LinkedIn: https://www.linkedin.com/in/charlie-phipps-%F0%9F%91%A8%E2%80%8D%F0%9F%92%BB-91338715b/
    YouTube: https://www.youtube.com/channel/UChmFBGU1YKIU91sNMQ7buGg
    Twitter: https://twitter.com/phipps0218

  • Sandeeprao8 Profile Picture
    4 on at

    Thanks @BCBuizer @phipps0218 for your response. 

    I am still getting the error message of incompatibility. Unable to convert.
    "The property on this control expects record values. the rule produces text values which are incompatible"

  • MVP-Phipps Profile Picture
    3,508 Super User 2024 Season 1 on at

    @Sandeeprao8 is Employee a People Picker? Can you do Employee.ID or Employee.Employee? If it is a people picker then it shouldn't be returning a text value. 

    Or it could be because you are saying the text value equals an ID which is a record value. Therefore rather than =ID you would need to do a lookup on a text value as well for example email...

  • Sandeeprao8 Profile Picture
    4 on at

    @phipps0218 Employee is stored as text in the database. On the form where i want to load the employee detail is a people picker control. And it wouldnt allow me to add any attribute to Employee whether be displayname or email. It give me the error. Hope this is clarifies.

  • BCBuizer Profile Picture
    22,505 Super User 2025 Season 2 on at

    Hi @Sandeeprao8 ,

     

    In that case the code to make this wor depends on the format of the information that is stored in the Employee column. If it is saved as a mail address the below should work:

     

    With(
     {_Employee: LookUp(SP DB,DataCardValue1.Text='ID',Employee)},
     {'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser", 
     DisplayName:"", 
     Claims:"i:0#.f|membership|" & Lower(_Employee), 
     Department:"", 
     Email:_Employee, 
     JobTitle:"", 
     Picture:""}
    )
  • MVP-Phipps Profile Picture
    3,508 Super User 2024 Season 1 on at

    Ok understood so you need to add the following:

    With(
     {_Employee: LookUp(SP DB,DataCardValue1.Text='ID',Employee)},
     {'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser", 
     DisplayName:"", 
     Claims:"i:0#.f|membership|" & Lower(_Employee), 
     Department:"", 
     Email:_Employee, 
     JobTitle:"", 
     Picture:""}
    )

    You can leave some fields blank like picture etc... because they are not mandatory.

     

    Please Accept as Solution if it solves your question. Or just give it a Thumbs Up if it is helpful because this can help others.

    LinkedIn: https://www.linkedin.com/in/charlie-phipps-%F0%9F%91%A8%E2%80%8D%F0%9F%92%BB-91338715b/
    YouTube:
    https://www.youtube.com/channel/UChmFBGU1YKIU91sNMQ7buGg
    Twitter:
    https://twitter.com/phipps0218

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