cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Microsoft
Microsoft

How to set a defaul value for a person fields in a SharePoint list?

Hi

 

I have an app and want to set a default value on a person field in PowerApps. The datasource is a simple SharePoint Online list with a person field in it. I know how to write the JSON to represent the person, but i am unsure on how to handle the field tile correctly.

 

Anyone knows how to achieve this easy?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: How to set a defaul value for a person fields in a SharePoint list?

Hi @HeikoHa,

Do you want to set a Default value for the Person field in the Edit form of your app?

The user @Brice235i has faced same issue with you please check the response within the following thread:

https://powerusers.microsoft.com/t5/Creating-Apps/Set-the-default-value-of-person-lookup-to-current-...

I have made a test on my side, please take a try with the following workaround:7.JPG

Set the DefaultSelectedItems property of the ComboBox control within the Executor Data card to following:

If(
    EditForm1.Mode=FormMode.New,
    {
        DisplayName: User().FullName,
        Claims: "i:0#.f|membership|" & Lower(User().Email)
    },
    Parent.Default
)

On your side, you should type:

If(
    EditForm1.Mode=FormMode.New,
    {
        DisplayName: "The display name of the user you want to set as default",
        Claims: "i:0#.f|membership|" & Lower("The email address of the user you want to set as default")
    },
    Parent.Default
)

More details about set a default value for a Person field in Edit form, please check and see the following blog:

https://powerapps.microsoft.com/en-us/blog/default-values-for-complex-sharepoint-types/

 

Best regards,

Kris

Community Support Team _ Kris Dai
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

1 REPLY 1
Highlighted
Community Support
Community Support

Re: How to set a defaul value for a person fields in a SharePoint list?

Hi @HeikoHa,

Do you want to set a Default value for the Person field in the Edit form of your app?

The user @Brice235i has faced same issue with you please check the response within the following thread:

https://powerusers.microsoft.com/t5/Creating-Apps/Set-the-default-value-of-person-lookup-to-current-...

I have made a test on my side, please take a try with the following workaround:7.JPG

Set the DefaultSelectedItems property of the ComboBox control within the Executor Data card to following:

If(
    EditForm1.Mode=FormMode.New,
    {
        DisplayName: User().FullName,
        Claims: "i:0#.f|membership|" & Lower(User().Email)
    },
    Parent.Default
)

On your side, you should type:

If(
    EditForm1.Mode=FormMode.New,
    {
        DisplayName: "The display name of the user you want to set as default",
        Claims: "i:0#.f|membership|" & Lower("The email address of the user you want to set as default")
    },
    Parent.Default
)

More details about set a default value for a Person field in Edit form, please check and see the following blog:

https://powerapps.microsoft.com/en-us/blog/default-values-for-complex-sharepoint-types/

 

Best regards,

Kris

Community Support Team _ Kris Dai
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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,953)