cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Advocate I
Advocate I

ComboBox DefaultSelectedItems From Option Set

How does one set the default selected item in a combo box when the items are set to an Option Set? 

 

Suppose I have a Car entity.  A field of the Car entity is Color.  Color is an option set ("Red, Blue, Yellow").  In the canvas app I have a combo box that displays the Color option set.  I'd like the combo box to default to the selected Color if it has already been set in the Car entity at some point earlier. 

 

I can't figure this one out.  I'm still new to Power Apps but this sure seems like it should be pretty simple and straightforward but I'm drawing a blank.

 

Thanks,

Dan

1 ACCEPTED SOLUTION

Accepted Solutions
Super User II
Super User II

Or taking your example. If the Items property of the Combo Box is set to:

Choices(Car.Color)

Say you want to set the DefaultSelectItems property of this combo box to "Blue", you can use:

[Color.Blue]

Or say there is a car record, CarA and you want to use its color as the DefaultSelectedItems, you can use:

[CarA.Color]

 

Let me know if this helps. 

 

---
If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

 

Thanks!

Hardit Bhatia

Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

 

View solution in original post

2 REPLIES 2
Super User II
Super User II

A combo box expects a table in the DefaulSelectedItems field. For example, if my Items property is ["Red", "Blue", "Orange"], then my DefaultSelectedItems property cannot be "Red", it has to be ["Red"] or ["Red", "Blue"]. 

 

Does that help?

 

---
If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

 

Thanks!

Hardit Bhatia

Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

Super User II
Super User II

Or taking your example. If the Items property of the Combo Box is set to:

Choices(Car.Color)

Say you want to set the DefaultSelectItems property of this combo box to "Blue", you can use:

[Color.Blue]

Or say there is a car record, CarA and you want to use its color as the DefaultSelectedItems, you can use:

[CarA.Color]

 

Let me know if this helps. 

 

---
If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

 

Thanks!

Hardit Bhatia

Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

 

View solution in original post

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (5,769)