cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
russrimm
Microsoft
Microsoft

Concat, Split, ComboBox and DefaultSelectedItems

*Update* I was able to figure it out.  The issue was column names didn't match.  I changed DefaultSelectedItems to RenameColumns(Split(Parent.Default,","),"Result","Skill") and working now.

--------------------------------------------------------------------------------------------------------------------------------------------
I have a form with a comboBox which I'm populating from one Sharepoint list, but then the selected results are stored in a different sharepoint list in comma delimited format in a multiple lines of text column type.

 

When the app is opened, if there's already an existing record for the user, it opens a form in edit mode and displays all the existing record.  All of the comboBoxes which are populated from a Choices column types work fine, but the multiple lines of text column that I'm trying to use to to populate DefaultSelectedItems is giving me trouble.  I know I need to Split the values into a table first, but it seems like it's not seeing the value in its Items equal what's in the Split array.  


Right now I have the comboBox DefaultSelectedItems set to Filter(myDataSource,Skills in Split(Parent.Default,",").Result).Skills and that's not working.  

 

Thanks in advance

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @russrimm ,

Have you solved your problem?

 

Yeah, you are right. If you want to set a default value within the ComboBox, the record value you provided within the DefaultSelectedItems property must contains the column name you used as display column value within the ComboBox.

 

If you use Column1 as display value within the ComboBox, you should set the DefaultSelectedItems property of the ComboBox to following:

{
  Column1: "Specific Valuexxxx"
}

For your scenario, you could also type the following formula within the DefaultSelectedItems property of the ComboBox:

ForAll(
       Split(Parent.Default,","),
       {
         Skill: Result
       }
)

 

If you have solved your problem, please consider go ahead to click "Accept as Solution" to identify this thread has been 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

1 REPLY 1
v-xida-msft
Community Support
Community Support

Hi @russrimm ,

Have you solved your problem?

 

Yeah, you are right. If you want to set a default value within the ComboBox, the record value you provided within the DefaultSelectedItems property must contains the column name you used as display column value within the ComboBox.

 

If you use Column1 as display value within the ComboBox, you should set the DefaultSelectedItems property of the ComboBox to following:

{
  Column1: "Specific Valuexxxx"
}

For your scenario, you could also type the following formula within the DefaultSelectedItems property of the ComboBox:

ForAll(
       Split(Parent.Default,","),
       {
         Skill: Result
       }
)

 

If you have solved your problem, please consider go ahead to click "Accept as Solution" to identify this thread has been 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.

Helpful resources

Announcements
Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

<
Users online (4,040)