cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Post Prodigy
Post Prodigy

Multi-Select ComboBox - how to read back in values?

Hi Folks -

 

I have a SP table populated with my Master Data Elements called "rdInvestments". In that tables, are additional columns (attributes) for each data element. One of them is "OrphanDesignation" and it's a text field.

 

Therefore, I have added that field to my EditForm and it's called "Regulatory Designation".  Now comes the tricky part.  I added a multi select ComboBox (ComboBox4) to this data card and included all of the applicable choices in the Items property.

card.jpg

 

Reg.jpg

 

Next, my target application requires the values to be delimited with a "comma" therefore in DataCardValue78, I have this formula and it's working great!

 

Mid(Concat(ComboBox4.SelectedItems, Value & ", "), 1, Len(Concat(ComboBox4.SelectedItems, Value & ", ")) - 2)

This works great for a net new data element and apply these Regulatory Designation values.  Howevever, when an end user wants to make a change request and change Regulatory Designation values that were previously submitted, they are obviously not showing up in the EditForm.

 

Is there a way I can read back in the values of "Reglaroty Designation" into the CombBox4? this poses two isseus becaiuse 1, the ComboBox is not directly connected to the SP list and 2, I think that fact they are comma delimited wont allow them to be read back into the ComboBox (if they could).

 

As an example, if an end user intiaited a change request on the this data element (PFI-000124-00162), I need to read back the Regularoty Designation values, highlighted:

save.jpg

 

Is there a way to achedive this?  Thank you!

 

 

 

 

f

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

@simms7400 

Yes, this is fairly easy to implement.  In your DataCardValue78 DefaultSelectedItems property, set the formula to the following:

   RenameColumns(Split(ThisItem.RegulatoryDesignation, ","), "Result", "Value")

This will split the value in the field by its commas and return a table with a Result column (that's what Spilt does).  The trick is that we just need to rename that column to "Value" because that's what the ComboBox wants (based on your Items property).

 

I hope that is helpful for you.

_____________________________________________________________________________________
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.
Check out my PowerApps Videos too!

View solution in original post

5 REPLIES 5
Highlighted
Super User III
Super User III

@simms7400 

Yes, this is fairly easy to implement.  In your DataCardValue78 DefaultSelectedItems property, set the formula to the following:

   RenameColumns(Split(ThisItem.RegulatoryDesignation, ","), "Result", "Value")

This will split the value in the field by its commas and return a table with a Result column (that's what Spilt does).  The trick is that we just need to rename that column to "Value" because that's what the ComboBox wants (based on your Items property).

 

I hope that is helpful for you.

_____________________________________________________________________________________
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.
Check out my PowerApps Videos too!

View solution in original post

Highlighted

@RandyHayes 


Thank you! So upon reading your suggestion, I'm noticed something. DataCardValue78 doesn't have a "DefaultSelectedItems" property, only my ComboBox4 does.   Did you mean to put it there? If so, when I do put it there, it works great!

 

As usual, thank you so much, Randy. HAve a great rest of your weekend!

Highlighted

@simms7400 

Oops...yep, just noticed on the picture - yes, ComboBox4

Sorry about the confusion. 

_____________________________________________________________________________________
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.
Check out my PowerApps Videos too!
Highlighted

Thank you! I've been puzzling how to do this for a while. This is the first solution thats worked for me. In the update property I got away with using Concat(ComboBox2.SelectedItems,Title,", ")

 

Gareth

Highlighted

Thanks for the solution, but i can't seem to get it to work as i want it to. 

 

I get all the values shown in the DefaultSelectedItems property however the combobox is still always empty. The values are never actually selected by default.

 

Is there something I'm missing?

 

Asaf.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

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

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (3,333)