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

How to set defalut value to Person or Group field

I am using powerapps customize form on sharepoint online. I would like to set the default value to "Person or Group" field on the shareoint list by using email address.

I would appreciate it if someone let me know how to get "Person or Group" value from e-mail address.

1 REPLY 1
v-monli-msft
Community Support
Community Support

Hi @Tomok1,

 

Since SharePoint list connection does not contains the SharePoint user profiles' data, if you only have SharePoint list as data source in this PowerApps, then this cannot be achieve unless you only want to set the current user as the default person.

 

1. If so, then this can be achieved using User() function.

 

The person or group field actually stores data as record, if you would like to save this record of the current user, then you may take a try with the method mentioned in the following article:

PowerApps Set SharePoint Person field to Current user

 

Record example:

 

{ 
  DisplayName:User().FullName,
  Claims:"i:0#.f|membership|" & Lower(User().Email), 
  Department:"",  
  Email:User().Email, 
  JobTitle:"", 
  Picture:""
}

 Or you may follow the steps below:

1. Select the Person or group field, un-lock it,

2. Change the Default property of the Dropdown box as:

 

If(Text(EditForm1.Mode)="1",{ 
  DisplayName:User().FullName,
  Claims:"i:0#.f|membership|" & Lower(User().Email), 
  Department:"", 
  Email:User().Email, 
  JobTitle:"", 
  Picture:""
},Parent.Default)

 

3. Change the Update property of the DataCard as below:

 

If(Text(EditForm1.Mode)="1",{ 
  DisplayName:User().FullName,
  Claims:"i:0#.f|membership|" & Lower(User().Email), 
  Department:"",  
  Email:User().Email, 
  JobTitle:"", 
  Picture:""
},DataCardValue10.Selected)

Here DataCardValue10 should be the Person or group dropdown control.

 

2. If you want to set the default person to a static one, then you could refer to this thread:

https://powerusers.microsoft.com/t5/General-Discussion/SharePoint-List-Update-Person-Field/m-p/6980/...

 

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.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (44,503)