I'm failry new to PowerApps and have ample experince with Infopath forms. I have a people picker field which is called "Employee" and I want to get the default user profile properties of the user selected in that Employee field. I'm able to set the people picker field to the current logged in user using the following code in the DefaultSelectedItems property of the DatacardValue22.
Claims: "i:0#.f|membership|" & Lower(Office365Users.MyProfile().Mail),
Because the primary text of the peoplepciker field is DisplayName, it is working fine and showing my name but I want to get the Email and other properties from the user profile and show them in respective text fields which will be disabled on the form. I'm not able to acheive that and also the properties need to update when I change the value of the 'Employee' Poeple Pciker field. Please help me on how to acheive this.
NOTE: There should be definitely a cleaner way to approach the set current user properties part but being new, I'm not entirely sure of that, I tried few ways using global variables and failed. I created the PowerApp from the studio and used a modern list as a datasource and I don't have the SharePoint Integrator yet as still PowerApps is not generally available to our environment as we have 'Classic Mode' at the tenant level.
Solved! Go to Solution.
I'll assume you are using form instead of gallery. Can you please unlock the DataCard, go to Advanced and set DisplayFields of your Card: People Picker to this:
If you are using gallery please let me know.
Hi @yvsuhas ,
Set the DisplayFields from ["DisplayName","Email","Picture"] to:
Hi @K-A-R-L ,
Thank you for responding. I'm using a form and my display fields are set to the values "["DisplayName","Email","Picture"]" for the Employee data card value but I'm not able to extract the Email address from the field as something like Employee.Email or DataCardValue22.SelectedItems.Email. I also need other properties like Department, Job Title and Phone Number as well.
So my own issue is unique. Please take a look at the screenshot below
So I'm trying to return the email value from a people column on SharePoint but I cant seem to find the email value of the People column from Powerapps. I noticed this happens to me with certain SharePoint List.. Please any Ideas..
So I was able to resolve this by manually typing in the "Email" value ie "test. Email" and it worked. Not sure why the Email isn't showing from the dropdown. Thanks
Check out new user group experience and if you are a leader please create your group
We are excited to announce that Demo Extravaganza for 2021 has started!
On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks
Don't miss the call this month on June 16th - 8a PDT