cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AnthonyPhan
Kudo Kingpin
Kudo Kingpin

Set Default Selection of Combobox

Hi All,

I have a "Single-Select" Combobox with the items populated by a collection called "WorkOrderTable". I would like to set the default selection using formulas but have been unsuccessfull. I tried setting the "Default" property with the formulars shown below:
image.png

 

 

However no default selection is shown: 

image.png

 

How do set the default selection of a combobox using formula?

1 ACCEPTED SOLUTION

Accepted Solutions
Sienna
Resident Rockstar
Resident Rockstar

If you want by default to have selected item then put your code from Default into DefaultSelectedItem property of combobox

View solution in original post

14 REPLIES 14
Sienna
Resident Rockstar
Resident Rockstar

If you want by default to have selected item then put your code from Default into DefaultSelectedItem property of combobox

Thanks @Sienna

 

I some how did not see the DefaultSelectedItem property. Works perfectly now.

OMG!

After stuggling with how to set a default for a Combobox versus a regular dropdown or lookup fo rthe last 2 DAYS I stumbled upon this post.

 

Everything is the same as a regular Dropdown - meaning you use the wacky stuff below in the default of the datacard holding the combobox Except - see the trick below....  Here is a sample of the entry in teh default of the datacard

 

{ '@odata.type' : "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Id:0,
Value:  "20"}

  

The trick is to go into the combobox and set the property "DefaultSelectedItems" property in the data section of the combobox control to Parent.Default ...  it is blank when you create a new datacard...  I was putting Parent.Default into the Default property DOH!!! I want my 2 days back now 🙂

 

I just did the same thing. Two days of searching and then I found this post. However, I'm getting it to return a defualt result but then it doesn't show the results overall or even the value that is selected in the field. Just that something is selected.

make sure to set the update property of the data card that holds the combobox to the combobox.selected..  you follow?

 

I wasn't using a datacard with my combo box but I was able to work through the issue. Turns out that when I added the defaultselecteditems property, it decided to change what values it was returning back. I had to change the DisplayFields and SearchFields back to what I originally had on that combobox and everything worked perfectly. Thanks for the help though!

Hi,

I'm also having same kind of issue.

In my scenario, 

I have a combo box which will be filtered based on values we choose from a Dropdown

DropDown= A, B,C

when a user selects A,C then there will be only 1 value in the combo box,

But when they choose B there will be multiple options on Combobox they need to select.

What my issue is: When a user selects A,C from dropdown a textbox should be populated with Combobox value automatically, but when user selects B they should be able to select options from combobox values.

How can i set the properties.

 texbox needs to be populated conditionally. like when they select A,C from dropdown then the textbox value should be the only value from combobox.

When they select B from the dropdown, they should be able to select 3 values from combobox and populate into the textbox.

textBox= Concat(combobox.SelectedItems,Result&",")

This is the formual i used on textbox.So what ever user selects on combobox will bepopulated into textbox

But textbox should be set to default combobox option when they select A,C from dropdown

digitaldanlim26
Advocate II
Advocate II

use ForAll function in DefaultSelectedItems property

 

ForAll(tableSource,Result)

@digitaldanlim26  This is the one that worked for me. 

Thanks!

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,117)