Hi community,
I am attempting to build a flow where I need to parse a .JSON and create or update those items in SP list.
I have the flow working, expect for the final step I get lost.. I need to add a control where it checks if those items already exist (WorkInstructionNumber) in Sharepoint, if yes, they need to be updated. I either end up in a loop or ALL my items in my SP list get updated..
Any ideas someone?
.JSON:
[{"WorkInstructionNumber":"1620348",
"WorkInstructionSubfileNumber":1,
"ETA":"2022-03-30T00:00:00",
"Description":"XXX",
"LocationDescription":"YYY",
"RegioCode":"ZZZ",
"Customers":
[{"CustomerName":"Client A",
"CustomerReference":"123456789",
"Required":"Y",
"UpdatesTo":"XXX",
"CustomerLetter":"A"},
{"CustomerName":"Client B",
"CustomerReference":"987654321",
"Required":"N",
"UpdatesTo":"",
"CustomerLetter":"B"}]}]
Visual
My current flow:
Hi @MashaOvchar ,
Technically, you need a Condition control after a List items of the list as well as the Filter array operator, you also need an Integer variable to countrows outputs of Filter array, in the Condition control, if the variable equals to 0, create item, else update item (item ID could be found in the Filter array outputs).
Best regards,
Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.
Hi @v-jefferni ,
Almost there, but not quite yet.. It seems when the item gets updated, each ID gets updated with details from each costumers.. So I end up for each ID with same customer details of the last customer in the .JSON..
Any ideas how to work around this? Much appreciated.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
67 | |
24 | |
16 | |
16 | |
13 |
User | Count |
---|---|
116 | |
35 | |
32 | |
28 | |
26 |