cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Microsoft
Microsoft

Re: Best Method to Compare values from a collecton?

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
Highlighted
Microsoft
Microsoft

Re: Best Method to Compare values from a collecton?

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

Highlighted
Helper V
Helper V

Re: Best Method to Compare values from a collecton?

@RusselThomas 

 

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

 

 

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

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 (7,329)