cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resolver I
Resolver I

Comparing ALL ComboBox selected items to ALL items in a Column

 

Is there a way to compare ALL items that a user has selected in a Combo box to ALL items listed in a Collection column (column's name is "Color" for this example)?

 

For example, there are 10 color options in a Combo box and the user selects "Red" and "Blue". I would like to go down the entire "Color" column and for ALL instances where "Red" or "Blue" occur in this column I want to enter the number "1" in another column within the Collection.

 

Right now I am using the UpdateIf in the OnChange property of the Combo box, but it only works on the first record it finds of either "Red" or "Blue" in the Collection's "Color" column. I cannot figure out a way to compare the other 50+ instances of "Red" and "Blue" remaining in the "Color" column.

 

Any suggestions on how best to do this?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Dual Super User
Dual Super User

Re: Comparing ALL ComboBox selected items to ALL items in a Column

Hi @AGS94 

 

Can you try out the below expression on your Combobox "OnChange" property:
 
UpdateIf(testcoll,Color in ComboBox1.SelectedItems.Value,{Value:1})
 
Here, testcoll is the name of my datasource and Color is the name of column which has the value for stored color and Value is the name of column, that will be updated.pqww.png

 

Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

2 REPLIES 2
Highlighted
Dual Super User
Dual Super User

Re: Comparing ALL ComboBox selected items to ALL items in a Column

Hi @AGS94 

 

Can you try out the below expression on your Combobox "OnChange" property:
 
UpdateIf(testcoll,Color in ComboBox1.SelectedItems.Value,{Value:1})
 
Here, testcoll is the name of my datasource and Color is the name of column which has the value for stored color and Value is the name of column, that will be updated.pqww.png

 

Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Highlighted
Resolver I
Resolver I

Re: Comparing ALL ComboBox selected items to ALL items in a Column

 

That worked perfect - thanks!

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,696)