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

Setting the default value for a Sharepoint Choice field

In Sharepoint the Choice field (HourType) has 5 possible values.  The default value set for the column is "Regular". In Powerapps the default is set to Parent.Default.  When creating a new item using Powerapps the default value is not populated on the screen as we would like to see.

Changing the default value in Powerapps to HourType.Value results in the following error in Powerapps:

"The property expects Record values, but this rule produces incompatable text values."  What do i need to do to display the default value for this field when creating new items?

I have searched for solutons with similiar errors but have yet to find a resolution.  Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Memorable Member
Memorable Member

Re: Setting the default value for a Sharepoint Choice field

@EdKOffice365 We just went through similar in this thread:

 

https://powerusers.microsoft.com/t5/PowerApps-Forum/Dropdown-field-is-initially-blank/m-p/62348#M257...

 

And the solution was to gather the Sharepoint column into a collection and then display the defaults from that list. Might be worth a try!

View solution in original post

7 REPLIES 7
Highlighted
Community Support
Community Support

Re: Setting the default value for a Sharepoint Choice field

Hi @EdKOffice365,

 

Have you checked this post?https://powerusers.microsoft.com/t5/PowerApps-Forum/How-to-set-a-pre-populated-default-value-of-a-Dr... Will the formula that hpkeong provided work for you? 

 

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.
Highlighted
Frequent Visitor

Re: Setting the default value for a Sharepoint Choice field

Unfortunately, all the suggestions in that thread produce error conditions.

 

The suggestion - - If(IsBlank(One of your datafield), "Inland", Parent.Default) produces the error condition "Invalid Argument Type (Record). Expecting a Text Value instead."

 

The suggestion - First(YourDropDown) results in "Warning: The columns produced by this rule are all nested tables and/or records, however the property expects at least some columns of simple values (such as text or numbers). and the "default record" is not displayed in the UI of a new record.

 

The suggestion - If(IsBlank(Receipt_Location);Parent.Default;Parent.Default) produces the error condition - the function 'If' has some invalid arguments.

 

What am I missing? This seems like a pretty simple request - Show the default value of a choice field when creating a new item in a SharePoint list.  Any other ideas?  Thank you.

Highlighted
Memorable Member
Memorable Member

Re: Setting the default value for a Sharepoint Choice field

@EdKOffice365 We just went through similar in this thread:

 

https://powerusers.microsoft.com/t5/PowerApps-Forum/Dropdown-field-is-initially-blank/m-p/62348#M257...

 

And the solution was to gather the Sharepoint column into a collection and then display the defaults from that list. Might be worth a try!

View solution in original post

Highlighted
Kudo Kingpin
Kudo Kingpin

Re: Setting the default value for a Sharepoint Choice field

The solution is in this post 🙂

 

https://powerusers.microsoft.com/t5/Using-PowerApps/Ability-to-set-a-default-value-for-a-Sharepoint-...

 

Works great.. make sure to read all the responses in this thread as there are some little tricks in doing this

Highlighted
Helper I
Helper I

Re: Setting the default value for a Sharepoint Choice field

Thanks the solution to capture into a Collection worked for me! 

Highlighted
Advocate III
Advocate III

Re: Setting the default value for a Sharepoint Choice field

I'm trying the above suggestion and getting an error in my syntax.  Its a choice field and want it to default to 'choose  one' if left blank

Highlighted
Helper IV
Helper IV

Re: Setting the default value for a Sharepoint Choice field

That "solution" thread gives me an access denied error, but for the sake of others coming across this the answer to the question from @dmclaughlin is to force the value by using - {Value: "Your Choice"} instead of just the choice in quotes. The V in value needs to be uppercase and the value needs to be one of the valid choices. So, using his screenshot as an example the combobox/drop-down control's DefaultSelectedItems property needs to be:

If(IsBlank(DataCardValue68.Selected.Value), {Value: "Choose one"}, Parent.Default)

 

Now, if you're just wanting placeholder text then I'd say don't use a default and just set the property InputTextPlaceHolder to: "Choose one"

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