web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Set Default Selection ...
Power Apps
Unanswered

Set Default Selection of Combobox

(0) ShareShare
ReportReport
Posted on by 284

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?

Categories:
I have the same question (0)
  • Verified answer
    Sienna Profile Picture
    1,532 on at

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

  • AnthonyPhan Profile Picture
    284 on at

    Thanks @Sienna

     

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

  • skylitedave Profile Picture
    652 on at

    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 🙂

     

  • XenophonD Profile Picture
    12 on at

    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.

  • skylitedave Profile Picture
    652 on at

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

     

  • XenophonD Profile Picture
    12 on at

    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!

  • MK1 Profile Picture
    169 on at

    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 Profile Picture
    43 on at

    use ForAll function in DefaultSelectedItems property

     

    ForAll(tableSource,Result)

  • rschneider Profile Picture
    75 on at

    @digitaldanlim26  This is the one that worked for me. 

    Thanks!

  • Rayo Profile Picture
    7 on at

    @digitaldanlim26 This worked for me too. Thanks so much.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard