cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Purrple
Frequent Visitor

Combobox and Patch: Amend current record to include previous and new

I have a combo box where users can select multiple values, hit a check mark, and then a label appears with all the values they've selected. On select of the checkmark patches these items to a SP list where they are all separated by a comma using concat. 

 

When they go back to the combo box all their previous selections are no longer highlighted and if they make a new selection it just replaces the text label/patch in place. 

 

How can I:

a) have the items pre-selected from before (apply as default from the label?) so that users can just add on any additional selections OR

b) have it add to the existing record separated by a comma rather than replace the whole thing?

1 ACCEPTED SOLUTION

Accepted Solutions
BCBuizer
Super User
Super User

Hi @Purrple ,

 

I would go for option a).

 

You can set the DefaultSelectedItems property to pre-select the items in the ComboBox. A possibility is to connect it to a Choice column which you also patch in parallel with the text column or.....

 

You use the Split() function to create an array of value which you then use in a filter against the data source of the combobox.

 

In case the above doesn't make it clear for you, please share the code for:

 - the patch formula

- the Items property of the ComboBox



Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

View solution in original post

2 REPLIES 2
BCBuizer
Super User
Super User

Hi @Purrple ,

 

I would go for option a).

 

You can set the DefaultSelectedItems property to pre-select the items in the ComboBox. A possibility is to connect it to a Choice column which you also patch in parallel with the text column or.....

 

You use the Split() function to create an array of value which you then use in a filter against the data source of the combobox.

 

In case the above doesn't make it clear for you, please share the code for:

 - the patch formula

- the Items property of the ComboBox



Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.
Purrple
Frequent Visitor

Great thinking! 

 

For other users who may stumble on this:

ComboBox DefaultSelectedItems is set to Split(SourceLabel.Text, ", ") where SourceLabel is the list of all my selections. I just patch as normal at that point using my button.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,421)