cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MitchC3
Level: Powered On

Autofill a Person/Group record for SharePoint list field (Default property)

I have a PowerApp created from a SharePoint list. The list uses the "Employee Name" column as a Person/Group. I want the default property of the data card value to have the user's display name filled out for them. Currently, the Default property is blank and my data sources are the related SharePoint list and Office365 Users.

 

User().FullName
Office365Users.UserProfile(User().Email).DisplayName

If I use these lines of code (or close variations) in the card's default property, then I get an error because they produce text values and the property expects a record value. Is there anyway around this or do the employees just have to live with typing the first 3 characters of their name/email for each request through the app?

2 REPLIES 2
Community Support Team
Community Support Team

Re: Autofill a Person/Group record for SharePoint list field (Default property)

Hi @MitchC3,

Can you share a bit more about your issue ?

 

Do you want to fill the DisplayName of the current user to “Emplyee NameDataCard automatically ?

 

I made a test. It worked.

14.PNG

 

Set Default property of the card to :

If(EditForm1.DisplayMode=New,Office365Users.UserProfile(User().Email),ThisItem.'Employee Name')

 

Regards,

Eason

Community Support Team _ Eason YU
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
MitchC3
Level: Powered On

Re: Autofill a Person/Group record for SharePoint list field (Default property)

The display name or email is fine, but the problem is everything I try including your suggestion produces an incompatible value type. The employee name field is a lookup of the active directory so you search your name and pick it. Everything I've tried produces a text value for the names and does not work with the lookup.

 

The Items property of that data card is:

Choices('SharePoint List Name'.Employee_x0020_Name)

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, August 21st at 8am PDT

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

SixthImage

Power Summit Australia 2019

August 20-23rd 2019

Users Online
Currently online: 29 members 3,849 guests
Recent signins:
Please welcome our newest community members: