cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper V
Helper V

Best Method to Compare values from a collecton?

Hi All.

 

I have a list of records that have been concatenated. I want to be able to lookup / compare the current selection to see if it matches any of the record or not (and return either true or false). I've been trying to create another collection to grab the results and concatenate them but it seems like it's not working.  The comparison should run form submit or before submit to make the check.

 

error.PNGresult_should_return_true.PNG

 

Any help would be greatly appreciated!

1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft
Microsoft

Hi @hnguy71 ,

 

It might help to know a bit more about the context, but based on what you've written, you're trying to see whether any of the concatenated combinations in the Data grid on the left of your image match the current combination of text inputs on the right of the image - is that right?

 

Based on the screenshot though, the left appears to be a collection of rows and the right appears to be fields that would make up one row, so - logically I would think that you'd want to check if the combination of fields on the right exists in the collection on the left before, presumably, adding them to the collection on the left as a concatenated rowset like the others?

 

Take a look a the following to see if it sounds like what you're trying to do.

 

Create a Label to see the output and set it's Text: property to:

 

Concatenate(Geomarket.Text, "|", SubGeoMarket.Text, "|", ProductLine.Text) //and so for all your text fields on the right
in
Mycollection.ConcatenatedColumn

 

Should resturn true based on the screenshot you showed.  I don't know what you're input fields are named, so substitute with your input text names.


Hope this helps,


RT

 

View solution in original post

2 REPLIES 2
Microsoft
Microsoft

Hi @hnguy71 ,

 

It might help to know a bit more about the context, but based on what you've written, you're trying to see whether any of the concatenated combinations in the Data grid on the left of your image match the current combination of text inputs on the right of the image - is that right?

 

Based on the screenshot though, the left appears to be a collection of rows and the right appears to be fields that would make up one row, so - logically I would think that you'd want to check if the combination of fields on the right exists in the collection on the left before, presumably, adding them to the collection on the left as a concatenated rowset like the others?

 

Take a look a the following to see if it sounds like what you're trying to do.

 

Create a Label to see the output and set it's Text: property to:

 

Concatenate(Geomarket.Text, "|", SubGeoMarket.Text, "|", ProductLine.Text) //and so for all your text fields on the right
in
Mycollection.ConcatenatedColumn

 

Should resturn true based on the screenshot you showed.  I don't know what you're input fields are named, so substitute with your input text names.


Hope this helps,


RT

 

View solution in original post

@RusselThomas 

 

That works surprisingly well and looks easier than I expected. Thanks again!

 

 

Helpful resources

Announcements
News & Announcements

Community Blog

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

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (5,777)