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 / Want to get people nam...
Power Apps
Answered

Want to get people name in label

(0) ShareShare
ReportReport
Posted on by 119

Hello,

 

I have one sharepoint list which have two people and people group column, which store Manager and corresponding requesters. Details are given below:

 

 

Error1.jpg

 

I want to display corresponding requester's Manager name in PowerApps label.

 

Example: if Sachin is login then i want to show Virendra as a manager in powerapp label. Please help.

Error2.jpg

 

Categories:
I have the same question (0)
  • KickingApps Profile Picture
    628 on at

    I have created a collection resembling your SharePoint list.  I have also created a variable setting the user to 'Betty' as the signed in user.  I then use a lookup in the 'mgr' label to lookup the signed in users managers name. 

    See below.  Hope this helps.

    Collect(
     colSample,
     {id: 1, mgr: "Me", Emp: "George"},
     {id: 1, mgr: "Me", Emp: "Ralph"},
     {id: 2, mgr: "Me", Emp: "Betty"},
     {id: 2, mgr: "You", Emp: "Gertrude"},
     {id: 2, mgr: "You", Emp: "Matilda"}
    );
    Set(thisUser, "Betty")

    Mgr label
    text = LookUp(
    colSample, thisUser = Emp, mgr)

     

     

  • v-xida-msft Profile Picture
    on at

    Hi @sachinsoni441,

    Do you enable "Allow Multiple Selections" option for the Requester column (Person type column) in your SP list?

    I assume that you have enabled "Allow Multiple Selections" option for the Requester column, but do not enabled "Allow Multiple Selections" option for the Manager column.

    I have made a test on my side, please take a try with the following workaround:

    If one Requestor match only one Manager within your SP list, please take a try with the following workaround:4.JPG

    Set the Text property of the Label control to following:

    "Manager: " & LookUp('20190114_case5', User().Email in Requester.Email).Manager.DisplayName

    O your side, you should type:

    "Manager: " & LookUp('YourEmpAndApproverSPList', User().Email in Requester.Email).Manager.DisplayName

    If one Requester could match multiple Managers in your SP list, please take a try with the following workaround:

    Set the Text property of the Label control to following:

    "Manager: " & Concat(Filter('20190114_case5', User().Email in Requester.Email), Manager.DisplayName & "; ")

    On your side, you should type:

    "Manager: " & Concat(Filter('YourEmpAndApproverSPList', User().Email in Requester.Email), Manager.DisplayName & "; ")

    More details about Filter function and LookUp function, please check the following article:

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-filter-lookup

     

    Best regards,

    Kris

  • sachinsoni441 Profile Picture
    119 on at

    Hello Kris,

     

    Many Thank for help,

     

    Now Manager's name displaying in label, but i get one warning message. i dont know why powerapp showing this warning message.

     

    Error1.jpg

     

  • Verified answer
    v-xida-msft Profile Picture
    on at

    Hi @sachinsoni441,

    Based on the screenshot that you mentioned, I think you have faced a Delegation issue within your app.

    The User().Email formula could not be delegated within your 'EmpAndApprover' SP list. In order to get rid of this Delegation issue within your app, please take a try with the following workaround:

    Set the OnVisible property or OnStart property of the first screen of your app to following:

    Set(CurrentUserEmail, User().Email)

    Set the Text property of the Label control to following:

    "Manager: " & LookUp('YourEmpAndApproverSPList', CurrentUserEmail in Requester.Email).Manager.DisplayName

    save your app, then re-load it again, check if the Delegation issue is gone.

     

    More details about Delegation in PowerApps, please check the following article:

    Delegation

     

    Best regards,

    Kris

  • sachinsoni441 Profile Picture
    119 on at

    Working Perfectly.

    Many Many Thanks Kris

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