cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Set current user as default value of Person or Group field

We are using O365. I have some list with some columns. One of the columns is of the type "Person or Group". I customized the detail form in PowerApps. The detail form is used for new, display and edit of list items. I would like to set the current user in this "Person or Group" field.

 

I found some posts on this forum where you need to create a new datasource "Office365Users". And then you need to set this as default value:

 

Office365Users.MyProfile()

 

 

But this is not working. When I create a new list item, I see the default value is set with the current user. But when I save the list item I got an validation error. Is there a solution to make this work?

16 REPLIES 16

In my case Field is not displaying the name its just empty . but when i save its storing in sharepoint list .

I am trying this solution and if I accept the current user as the entry then it works fine and the value is stored.

However, if I edit the entry, using the dropdown, to select an alternative person the *current user* is still stored as the value in the list.

I have pasted exactly as show apart from editing DataCardValue10.Selected to DataCardValue11.Selected appropriately for my datacard.

 

 

Anonymous
Not applicable

Thanks,
This works perfect and suits to my project. Better than the previous untesteted one by another person.

Hello,

I am trying a very similir thing (without success): fill in the current user in a (single) person group field. 
I tried all of the solutions discussed here (with and without if() function) but I always get an
error message that there is an unexpected character. The formula contains ParentClose but "Error" is expected.

 

I am trying this formula in the field DefaultSelectedItem:

{
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims: "i:0#.f|membership|"&User().Email,
DisplayName: User().FullName
}

---> with and without the @odata field.

 

The Powerapp form is only used to modifiy a listitem, the item itself is generated with a flow. The column is set to required=true within the Powerapp and is set to "not visible". The powerapp is the form connected to the sharepoint list.

Hei 

Send me your email i will send u what i had done 


@OlafStetzer wrote:

Hello,

I am trying a very similir thing (without success): fill in the current user in a (single) person group field. 
I tried all of the solutions discussed here (with and without if() function) but I always get an
error message that there is an unexpected character. The formula contains ParentClose but "Error" is expected.

 

I am trying this formula in the field DefaultSelectedItem:

{
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims: "i:0#.f|membership|"&User().Email,
DisplayName: User().FullName
}

---> with and without the @odata field.

 

The Powerapp form is only used to modifiy a listitem, the item itself is generated with a flow. The column is set to required=true within the Powerapp and is set to "not visible". The powerapp is the form connected to the sharepoint list.


 

Dears,

 

I have a Created BY datacard which is a Person Group field type but combo box in powerapps.

Kindly help me to get the current logged in user on opening NEW form and on edit of same form, the created by field must be populated.

I tried the above given solutions but unable to achieve it.

 

Thanks in advance.

 

If you do it on the default selected that will only SHOW the current user. You also need to put that same table format data on the Update of the card for your form. I do not think this always been the case but it is now. 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (5,351)