cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
AGS94
Level: Powered On

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
Super User
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!
2 REPLIES 2
Super User
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!
AGS94
Level: Powered On

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

 

That worked perfect - thanks!

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

Follow PowerApps on Twitter

Stay Up-to-Date by following PowerApps on Twitter

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

Users Online
Currently online: 38 members 4,423 guests
Please welcome our newest community members: