Hi @John Doe ,
Which version of experience are you applying to your SharePoint Online list, modern experience or classic experience?
If you are using modern experience, please refer to the following steps:
- Go to your list->Power Apps->Customize forms:
2) Click FormScreen1 on the left Tree view->Advanced on the right->OnVisible->fill the text box with following code:
UpdateContext({
CurrentUser: {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims: "i:0#.f|membership|" & Lower(User().Email),
Department: "",
DisplayName: User().FullName,
Email: User().Email,
JobTitle: ".",
Picture: "."
}
})
3) Click the people or group field DataCard(which is named Name_DataCard1 in my example) on the left Tree view:
Go to Advanced on the right and click on unlock to change properties->fill the variable to “CurrentUser” in the Default column as shown below:
4) Save the form and publish it to SharePoint. Then you can see the people or group field has been populated with the current user when you “New” item in your list.
If you are using classic experience, please refer to this article to use JS code to meet your needs:
SharePoint Online: Set Current User as Default Value in Person or Group Field
Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.
I hope this information has been useful, please let me know if you still need assistance.
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.