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

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
Highlighted
Memorable Member
Memorable Member

Re: Set Default Selection of Combobox

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

9 REPLIES 9
Highlighted
Memorable Member
Memorable Member

Re: Set Default Selection of Combobox

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

Highlighted
Kudo Commander
Kudo Commander

Re: Set Default Selection of Combobox

Thanks @Sienna

 

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

Highlighted
Kudo Kingpin
Kudo Kingpin

Re: Set Default Selection of Combobox

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 🙂

 

Highlighted
Frequent Visitor

Re: Set Default Selection of Combobox

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.

Highlighted
Kudo Kingpin
Kudo Kingpin

Re: Set Default Selection of Combobox

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

 

Highlighted
Frequent Visitor

Re: Set Default Selection of Combobox

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!

Highlighted
Helper IV
Helper IV

Re: Set Default Selection of Combobox

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

Highlighted
Advocate II
Advocate II

Re: Set Default Selection of Combobox

use ForAll function in DefaultSelectedItems property

 

ForAll(tableSource,Result)

Highlighted
Advocate II
Advocate II

Re: Set Default Selection of Combobox

@digitaldanlim26  This is the one that worked for me. 

Thanks!

Helpful resources

Announcements
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 (3,914)