Hi Guys,
I am trying to run a flow that pulls rows from a sql server table, checks if the row is already added to a sharepoint list, and updates the row if it already exists, and creates the row if it doesn't exist, Here is what I have tried:
In this case the title in Sharepoint is populated with the ID. What do I need to put into the condition box in order for the flow to run correctly? is there a better way to do this?
Solved! Go to Solution.
I suggest another better approach as below:
On the GetItems you add a filter Query:
This will return records only in case the Title of the sharepoint list exists with the SQL ID
Then you check the length of returned records if greater than 0, then records exists and you need to Update ; otherwise create
Expressions for 1& 2:
length(outputs('Get_items')?['body/value'])
outputs('Get_items')?['body/value'][0]['ID']
I suggest another better approach as below:
On the GetItems you add a filter Query:
This will return records only in case the Title of the sharepoint list exists with the SQL ID
Then you check the length of returned records if greater than 0, then records exists and you need to Update ; otherwise create
Expressions for 1& 2:
length(outputs('Get_items')?['body/value'])
outputs('Get_items')?['body/value'][0]['ID']
Thank you so much, this worked perfectly.
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.
User | Count |
---|---|
77 | |
19 | |
17 | |
14 | |
11 |
User | Count |
---|---|
133 | |
34 | |
31 | |
31 | |
24 |