So I have seen similar posts trying to do what I am describing but I can't quite get it to work.
In summary:
1. I have a sql table which contains items that periodically gets added to it.
2. I have a sharepoint list which contains items that I keep sync with the sql table from 1. (That is, I copy items and remove items from the SharePoint list as they appear and disappear from the sql table)
3. I want to get rows from the sql table, get items from sharepoint list, check if an item exist, do nothing. If it doesn't exist, add to the sharepoint list
Both lists have keys that are used to make each item unique. This key key_P&LGroup
Here is an idea I am pursuing based on the summary
For some reason I can't get this to work....What I am doing wrong?
Solved! Go to Solution.
Hi @Anonymous ,
Please refer to screenshot below to create the flow:
The expression for the first value in the Condition as below:
length(body('Filter_array'))
Best regards,
Alice
Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous
I think you can use a filter array action instead of append to array.
In the value from you can pass the value form SQL GET ROWS this will be our main array.
Now in the below you can compare it with Value coming from SHARE POINT GET ROWS.
On the LHS side of the condition select Share point and on the RHS side select output that you want to compare from SQL.
Once you have this value you can pass the Output of this to an APPLY TO EACH loop and you can put just create item action inside that.
It will create an item for all the actions that satisfied the condition.
If this information helps you, please hit the like button and mark the solution as resolved, so that it will help other users in future.
Thanks @Krishna92
I setup something similar to what you propose here and here's what I got
I can't compare the sharepoint and the sql without running into an apply to each.....So thats 1 and the body at Apply to each 2 contains only the matches of the keys which is, only items that exist in the sharepoint since Apply to Each is bringing items that match on both sides.
What I was hoping to get was items that exist in sql table but not in the sharepoint get added...I used the variable just a test to check how many items would be created if my logic works
Hi @Anonymous ,
Please refer to screenshot below to create the flow:
The expression for the first value in the Condition as below:
length(body('Filter_array'))
Best regards,
Alice
Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
15 | |
13 | |
13 | |
10 | |
10 |
User | Count |
---|---|
32 | |
26 | |
18 | |
12 | |
12 |