0

I am trying to compare the value of two columns where their origin is two different Sharepoint lists, in the first column called 'Solicitante' belongs to list A where the column type is a line of text, the second column called 'Usuario' belongs to list B equally the column type is a line of text.

I need to validate and compare is that if the two columns are the same, it starts an approval and in case they are not the same, it will send an email.

As help I have consulted the following topic where he comments that he also wants to compare two columns, I have tried to replicate it in my flow but I am presenting the problem that emails begin to be sent for each record that I have my list A taking into account that the value of the column 'Solicitante' and the value of the column 'Usuario' are the same, case that should not happen since if they are the same no mail is sent.

I have built the flow as follows:

  • First I get the items from list A and then I get the items from list B respectively called 'get items' and 'Get items 2'

enter image description here

  • Then I have a validation (really nothing important for the question) but I use it to validate if the reason is New or replacement, it is really not important to comment on it in this case since this validation works correctly.

enter image description here

  • Here comes the important thing, when the reason is New in the previous validation will enter to perform the validation that I am looking for to compare the two columns, following the indications of the topic that I commented above I make the comparison of the two columns adding an Apply to each for each value obtained from the elements.

enter image description here

  • As you can see in the 'Apply to each 6' I refer to the value I get from the step 'Get items 2' and in the 'Apply to each 7' I refer to the value I get from the step 'get items', later in the condition (Valid user leader) 3 I perform the validation of comparing the two columns 'Solicitante' and 'Usuario' these columns are obtained from the steps of 'get items' and 'Get items 2' respectively.

So far my complete flow, in summary as I already mentioned the problem I am presenting is that for each record I have in list A an email is sent, a case that should not happen because if the columns of list A and list B are the same, the emails will not be sent.

Another point to keep in mind, is the validation if it is being fulfilled successfully since it also initiates the approval along with that also sends the emails, is there something that is wrong in my flow ?

1 Answer 1

0

How to compare items in two SharePoint lists in Power Automate Define the synchronized columns. The flow begins with the definition of the columns that are synchronized. Get items from both lists. To compare the items, you must get the items. Compare the items. Compare the values in synchronized columns. Get the changes.

Regards, Peter

1
  • Thank you for your answer, do you think that part of what I have built so far in the flow can be solved as you mention? Could you add an example based on what I have built from my flow to complete it?
    – John Doe
    Sep 12, 2022 at 13:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.