Showing results for 
Search instead for 
Did you mean: 
Not applicable

Flow that before inserting data in a list, check if that data is already in another list

Hello everyone,

I want to create a Flow that inserts the data of a json in an SP list (list1), but before inserting, check if a specific data from the json (Machine) already exists in another SP list (list2). If it exists, the flow will insert the data in list1, capturing the Machine value of list2 and inserting it in list1. If not, it does nothing.

This is the structure of list1 (where the flow will insert the json data, if the conditions are met):

TitleMachine ValuePlageHoraireDebutEquipe

And the structure of list2 (where the flow will check if the Machine coming from the json exists in this list):


Below is my flow for you to see. I can't see where it could be wrong. Whenever I run the flow, the IF condition always gives false and the flow runs successfully, but does not insert any values ​​in list1 because the condition always gives false.

I don't know if the condition Machine (json) = Machine (list2) always gives false because the Machine column in list2 is of the Choice type or what it can be.

Can someone help me?

P.S: The "Machine" column in list2 is a Choice type.
P.S2: My json follows this structure:
"PlageHoraireDebut": "09/16/2020",
"Equipe": 2,
"Machine": " XX5"

Super User
Super User


"The "Machine" column in list2 is a Choice type."

I beleive that's the problem. The left side of your condition rule currently contains 'Machine' selected from Dynamic content menu, right?

I would open again the dynamic content menu, search for 'Machine Value' and use it instead

Hope this helps

Each time you click on any of our inspiring answers 'Thumb up' icon... ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!

Escribo sobre Power Automate en:

Proud to be a Flownaut!

Not applicable

Hi @efialttes Thanks for the answer!

I switched to Machine Value and even so the condition still gives me FALSE. Now it is like this:


As the condition it is always FALSE, I created a set variable for the two variables in the FALSE condition, to see what each value receives. 
"Set variable = Machine Value (from the list2)"
"Set variable 2 = Machine (from the json)"

As you can see, the condition values ​​are the same (A02). But even so, the condition of comparison always shows me FALSE.

Helpful resources

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Users online (3,684)