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

Property fields

Hello ;

 

How is it possible to do:

                 In a Person field => the default value is the user connected

                 In a choice field => take a default value

 

I test : 

 Person field => Default => User().Email

 Choice Field ["A","B","C"] => default => {Value :"A"}

 

Thanks for your help ! 🙂 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Property fields

Hi @bansay ,

Do you want to set a Default value within the Person field and Choice field in the Edit form?

Do you generate an app based on your SP List data source?

 

I assume that you generate an app based on your SP list data source, and want to set a Default value within the Person field and Choice field in the Edit form when the Edit form is in New form? According to the formula you provided, I think there is something wrong with it.

 

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

Set the DefaultSelectedItems property of the ComboBox within the Person field data card in the Edit form to following:

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

Set the DefaultSelectedItems property of the ComboBox within the Choice field data card in the Edit form to following:

If(
    EditForm1.Mode = FormMode.New,
    {
        Value: "A"
    },
    Parent.Default
)

Please take a try with above solution, then check if the issue is solved.

 

Please check and see if the following thread would help in your sceario:

https://powerusers.microsoft.com/t5/Building-PowerApps-Formerly/Setting-Field-Default-Value-to-be-th...

 

Best regards,

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

2 REPLIES 2
Super User
Super User

Re: Property fields

You can set default values for the person and choice fields. This example assumes you are using a form and that the default values should be set when the form is first created.

 

Person Field:

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

 

Choice Field:

If(EditForm1.Mode = FormMode.New, { Value: "YourDefaultValue" }, Parent.Default)



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
Community Support Team
Community Support Team

Re: Property fields

Hi @bansay ,

Do you want to set a Default value within the Person field and Choice field in the Edit form?

Do you generate an app based on your SP List data source?

 

I assume that you generate an app based on your SP list data source, and want to set a Default value within the Person field and Choice field in the Edit form when the Edit form is in New form? According to the formula you provided, I think there is something wrong with it.

 

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

Set the DefaultSelectedItems property of the ComboBox within the Person field data card in the Edit form to following:

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

Set the DefaultSelectedItems property of the ComboBox within the Choice field data card in the Edit form to following:

If(
    EditForm1.Mode = FormMode.New,
    {
        Value: "A"
    },
    Parent.Default
)

Please take a try with above solution, then check if the issue is solved.

 

Please check and see if the following thread would help in your sceario:

https://powerusers.microsoft.com/t5/Building-PowerApps-Formerly/Setting-Field-Default-Value-to-be-th...

 

Best regards,

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
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 (5,161)