How to compare two collections

harishrmeda

New Member
I have two collections and I need to compare both the collections. If collection values are the same in a particular field, I need to copy that data into the third collection and I need to add one more column Results. If both the values from the first two collections are the same that need to update the Results column with the "Success" value. If both are not the same need to update the Result column with "Failed" value.
 

harishrmeda

New Member

Sachin_Kharmale

Active Member
Hi Harishrmeda,
if you want to compare two collections and store matching rows in another collection with extra column result so you can do this with the help of blue prism code stage.

for code stage input will be Input Collection 1 and Input Collection 2 after executing code stage you will get result in output collection with matching rows.


1.Object Main Page flow.
View attachment 1578034829963.png
2.Input Collection 1.
View attachment 1578034848290.png


3.input Collection 2.
View attachment 1578034866784.png
4.Code Stage Code.
View attachment 1578034910740.png
5. After Executing code result Collection.

View attachment 1578034931595.png
I hope it will help you..!
 

Mahesh239

New Member
Hi Sachin

I have tried the code. But its showing error as below:
'System.Array' does not contain a definition for 'SequenceEqual' and no extension method 'SequenceEqual' accepting a first argument of type 'System.Array' could be found (are you missing a using directive or an assembly reference?)

Is there a need to add any Namespaces and .dll references in Initialize page?

Thanks,
Mahesh
 
Top