cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
NFMynster
Level: Powered On

ComboBox default selected items from a collection doesn't work

Hello everyone.

I'm having troubles loading defaults into a combobox, from a collection.

I have a ComboBox that's defined like this:

The SelectedItems is a collection that's collected by calling

 

ClearCollect(SelectedItems,ComboBox1.SelectedItems);SaveData(SelectedItems, "SavedSelectedItems");

So it's expected that when the SelectedItems collection isn't empty, it will have those entries selected as default.

 

However, this is only partly working.

 

The preview of the ComboBox looks fine, like this:

However, when you press it, the items aren't actually selected.

What am I doing wrong?
I uploaded a simple reproduction project and attached to this topic, if you want to try it out and see what I mean.

 

Thanks

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: ComboBox default selected items from a collection doesn't work

Hi @NFMynster ,

Could you please share a bit more about your SelectedItems collection?

 

I have made a test on my side, and found that there is something issue with the value you typed within the DefaultSelectedItems property of the ComboBox.

Please take a try with the following workaround for more details:4.JPG

 

5.JPG

Set the DefaultSelectedItems property of the ComboBox to following:

ForAll(
       SelectedItems,
       {
           Value: Value
       }
)

On your side, please consider take a try to set the DefaultSelectedItems property of your ComboBox to following:

ForAll(
       SelectedItems,
       {
           Value: Value
       }
)

then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Community Support Team
Community Support Team

Re: ComboBox default selected items from a collection doesn't work

Hi @NFMynster ,

Based on the issue that you mentioned, I think you have some misunderstanding with the DefaultSelectedItems property of the ComboBox control.

 

The DefaultSelectedItems property of the ComboBox control is used to set a Default value within the ComboBox control. But the Default value just be displayed within the ComBoBox, rather than select corresponding values from the ComboBox available options and display it.

 

In other words, the Default value just be used as a Display value within the ComboBox, which would not be recognized that you selected corresponding values from the ComboBox available options.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
NFMynster
Level: Powered On

Re: ComboBox default selected items from a collection doesn't work

Thank you.

So just to clarify is it not possible having a ComboBox that has some items selected by default?

 

 

 

Community Support Team
Community Support Team

Re: ComboBox default selected items from a collection doesn't work

Hi @NFMynster ,

Could you please share a bit more about your SelectedItems collection?

 

I have made a test on my side, and found that there is something issue with the value you typed within the DefaultSelectedItems property of the ComboBox.

Please take a try with the following workaround for more details:4.JPG

 

5.JPG

Set the DefaultSelectedItems property of the ComboBox to following:

ForAll(
       SelectedItems,
       {
           Value: Value
       }
)

On your side, please consider take a try to set the DefaultSelectedItems property of your ComboBox to following:

ForAll(
       SelectedItems,
       {
           Value: Value
       }
)

then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 322 members 6,294 guests
Please welcome our newest community members: