cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
lreinhard7
Level 8

MS Flow - Elements contained in text

Hi, 

 

I have an issue where I need some help. My issue is as follows:

1. I have a string variable that contains some text. 

Example: 

Blablabla 12345, 22222

2. Then I have another string that I extracted from an array. 

Example: 

12345, 22222, 98909

 

Aim: 

I want to check whether the elements from no 2 are contained in no 1

Problem: 

There are too many combinations. As an example, I can exact 12345 from no 2 and then find that this is included in no 1. But then I want to know if also 22222 is included in no 1 and also the third element. It might be the case that only 22222 is included in no 1 or 22222 and 98909 but not 12345.

 

Question:

Is there a smart way to check which of the elments from no 2 are included in no 1 with the help of MS Flow?

 

Would be great if somebody could help.

Many thanks in advance.

 

Ludwig 

1 REPLY 1
Super User
Super User

Re: MS Flow - Elements contained in text

Hi @lreinhard7 

 

What you can do is, you already have two arrays. 

lets us name them as Array 1 and Array 2. 

You want to check what all elements of array 2 are included in array 1. 

 

First, initialise a 3rd array and leave the value blank. Now add an action apply to each and in this put the array2. within the apply to each, add a condition and on the left put the array 1 and the operator will be contains and on the right side put current item. In the yes branch add an action -> append to array variable and then select the third varaiable name and the value is current item. 

 

This way you will get all the elements of array 2 contained in array 1 in the array 3. You can create an array 4 and put that in the no branch to get the elements of array 2 that are NOT contained in array 1. Makes sense?

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Users Online
Currently online: 80 members 4,616 guests
Please welcome our newest community members: