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?
Hi @MitchC3,
Can you share a bit more about your issue ?
Do you want to fill the DisplayName of the current user to “Emplyee Name”DataCard automatically ?
I made a test. It worked.
Set Default property of the card to :
If(EditForm1.DisplayMode=New,Office365Users.UserProfile(User().Email),ThisItem.'Employee Name')
Regards,
Eason
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)