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

autopopulate person or group field with author

Hi , 

 

I have a field of type Person or groupp in Sharepoint. 

In powerapps, i created the form and it shows mw a drop down , where I search for the name and select .

 

What I want is , by default this field should be populated with the author name

 

any suggestion ?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: autopopulate person or group field with author

Hi @ssvk,

 

What @dinusc suggested would only work when editing exsiting records, not the new ones. Please try below below formula on the Default property of the Person and Group data card. This works both with NewForm/EditForm mode for me:

If(IsBlank(ThisItem.Person),
{'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser", Claims:"i:0#.f|membership|" & Lower(User().Email), Department:"", DisplayName:User().FullName, Email:User().Email, JobTitle:".", Picture:"."},
ThisItem.Person)

 

Person is the column name.

 

1.PNG

 

 

Capture.PNG

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Microsoft dinusc
Microsoft

Re: autopopulate person or group field with author

Hello @ssvk,

 

By "author name" I assume you mean the value of "Created By" field which is the row author. If so then all you need to do is to find the card name that is bound to the "Created By" field (for example DataCard1) and then set the following formula in the ComboBox "DefaultSelectedItems" field:

If(IsBlank(Parent.Default),DataCard1.Default,Parent.Default)

Note that you will have to unlock the card that contains the ComboBox control before you can update the "DefaultSelectedItems" field.

Community Support Team
Community Support Team

Re: autopopulate person or group field with author

Hi @ssvk,

 

What @dinusc suggested would only work when editing exsiting records, not the new ones. Please try below below formula on the Default property of the Person and Group data card. This works both with NewForm/EditForm mode for me:

If(IsBlank(ThisItem.Person),
{'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser", Claims:"i:0#.f|membership|" & Lower(User().Email), Department:"", DisplayName:User().FullName, Email:User().Email, JobTitle:".", Picture:"."},
ThisItem.Person)

 

Person is the column name.

 

1.PNG

 

 

Capture.PNG

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (3,899)