cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
NigelP
Level 8

Defaults in Combo Box

Hi 

I have a SharePoint list containing the name of the countries of the world.

 

I can set my "Items" property of my combobox to this list and all is well.

 

I have a list of countries I want to select in a text variable vCountries(local variable)  each country seperated by ", ".

 

I have tried to display the selected countries by setting "DefaultSelectedItems" property of the combobox to split(vCountries,", "). Nothing displayed.

 

I have tried setting "DefaultSelectedItems" property of the combobox to Parent.Default and then setting the "Default" Property in the Datacard (inside which is the combobox) to vCountries.  A bit better in that I get all of the countries I want selected displayed in the ComboBox but as a single string each country seperated by ", ".  

 

What I really want is all of the countries I want selected  displayed in the ComboBox but as seperate items.

 

What am I doing wrong ?

 

Thanks

 

Nigel

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Defaults in Combo Box

Split returns a single column table of "Result"

Your ComboBox is probably looking for the DisplayField to be "Value".

 

So, you could redo your DisplayField (which might cause issue with the other logic in your app), or, for DefaultSelectedItems property use this:

   RenameColumns(split(vCountries,", "), "Result", "Value")

 

Hope this helps...

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

2 REPLIES 2
Super User
Super User

Re: Defaults in Combo Box

Split returns a single column table of "Result"

Your ComboBox is probably looking for the DisplayField to be "Value".

 

So, you could redo your DisplayField (which might cause issue with the other logic in your app), or, for DefaultSelectedItems property use this:

   RenameColumns(split(vCountries,", "), "Result", "Value")

 

Hope this helps...

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

NigelP
Level 8

Re: Defaults in Combo Box

Hi @RandyHayes

 

Thanks - that was the problem !!!

 

Regards

 

Nigel

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 (Last 30 Days)
Users online (4,445)