Array of Strings

Hello everyone,

I have 2 set of array of strings
Array 1 {A1, A2, A3…A10}
Array 2 {A1, S1, A10, J7}

If any one of the elements in Array 2 , exists in Array 1 , then i want to return true, if possible with the number of matches. In the abve eg , A1 and A10 exists in Array 1, then i return TRUE, 2.

Appreciate any responses to this, Thank you!

Hey @Purnima_Sambasivan,
Simply using One ForEach inside of another should do the trick.
Might not be the cleanest solution, perhaps someone else can improve on it, but it does get the job done.

Here’s the example:
CompareArrayElements.xaml (9.9 KB)

P.S. Please mark as solution if it helps you out :wink:

1 Like

Hi,

Can you try the following expression?

array2.Count(Function(x) array1.Contains(x))

Regards,

ArrayComparision.zip (2.3 KB)

Hi,
Please find the attache sample workflow file in simple steps.

Hoe it works for you. Please mark as solution if it works

What does this return. It gives me an error Please advise if instead of array 1 it is a String(tect) and array 2 remains the same.

Hi,

It gives me an error

What error do you have?

Regards,

Hi,

Here is a sample.

Sequence2.xaml (5.2 KB)

Regards,

Brillant ! works actually… thank you so much !:slight_smile:

1 Like

Hi,

FYI, I just update sample for your spec.(added “from string” and normalization) Hope the following helps you.

Sequence2.xaml (5.9 KB)

Regards,

WOW … Awesome ! Thank you :smiley:

1 Like

Thank you so much , great solution to compare second array directly within the first one. This works well :slight_smile:

Thank you !:slight_smile: This works , but like you said , its bit lengthy

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.