cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
hnguy71
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
RusselThomas
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
RusselThomas
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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Did you miss the call? Check out the recording here!

Top Solution Authors
Top Kudoed Authors
Users online (25,129)