cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Responsive Resident
Responsive Resident

Compare two columns with multiple items

hi all,

in one application i save a value to column X. once a day a flow should run and check if the value in column X is the same as in column Y.... the value in X or Y are actually text values, separated by comma (used for combobox).

the possible scenario is like:

- X: a1,a2,a3

- Y:a1,a3

now in this example we see, or the flow should see, that a2 is missing, therefore some actions should happen...(send email, give access etc) and eventually a2 should be added also to Y so these actions wont repeat at next run... Another example would be in different direction, X would contain less then Y, then other actions apply and eventually the missing item should be removed also from Y.

 

(story background of this attempt.... users should always grant access and notify particular users that are required for the particular job...  therefore we created a list where one column is group name and other column will be users that should be notified... in the application users will pick one or many groups... this way he wont forget to add the user but its just really tricky to grant access to document library or folder within such library... therefore this solution seems to me now as one more reasonable variant)

1 ACCEPTED SOLUTION

Accepted Solutions
Kudo Collector
Kudo Collector

What you can do is to iterate through your main column and check if each value from your second column exists. If not, fill another array variable with the value that is missing. You can then send an email (or do something else) when that array contains items

 

This means you have to configure an Apply to each for your main column and check if that value exists in your second column. Something like this: 

rikdekoning_0-1606911351718.png

 

When you run this flow, you will see that the last compose action contains the A2 an A4 items, which are exactly the items that are missing in the arrY array, compared to the arrX array:

rikdekoning_1-1606911409204.png

 

View solution in original post

2 REPLIES 2
Kudo Collector
Kudo Collector

What you can do is to iterate through your main column and check if each value from your second column exists. If not, fill another array variable with the value that is missing. You can then send an email (or do something else) when that array contains items

 

This means you have to configure an Apply to each for your main column and check if that value exists in your second column. Something like this: 

rikdekoning_0-1606911351718.png

 

When you run this flow, you will see that the last compose action contains the A2 an A4 items, which are exactly the items that are missing in the arrY array, compared to the arrX array:

rikdekoning_1-1606911409204.png

 

View solution in original post

Responsive Resident
Responsive Resident

yes, few min. after posting the question i realized that 🙂 just one add, i really have to check at least 3 times... if currenlty x is empty and y not... etc...

Helpful resources

Announcements
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (4,141)