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

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
Community Support

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
Highlighted
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
Community Support

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
Ignite

Microsoft Ignite

This will be a conference that you do not want to miss!

secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response 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,022)