Hello
My Flow looks like this:
Manually trigger -> Get rows(SQL database) ->Apply to Each wrapper -> Get items(SP) -> Condition length(outputs('Get_items')?['body/value']) is greater or equal to 1 -> if true -> nothing -> if false -> Create item(SP)
Get Rows (V2) - is connected
Apply to each - gets the body/value from Dynamic content(Get Rows/SQL)
Get items - connected to the sharepoint list
Condition - length(outputs('Get_items')?['body/value']) is greater or equal to 1
if false - create item
if true - nothing
What my flow should do is to:
Get rows from my SQL database and check if the values in the database match the ones in my SP list and if not then take newest items and create them in SP.
It's pulling data from a SQL server, the database has 14 entries and if i run the flow, all 14 entries gets created in my SP List.
For the test, i then create one new entry, so there are now 15, i run the flow and it works in the way that it's not creating duplicates, so seems like my condition works, it shows in the flow that it found 15 entries but my newest entry is not created in SP
Image is of the raw inputs from the database, the one with ID 52 is my test entry.
It returns "True" in the condition so the action to create item is "skipped"
Everywhere i've article block or anything related to my issue, i'm told the expression length(body('Get_items')?['value']) is greater or equal to 1 is how i can solve my problem, an i feel like i'm close, i just can't get it to work correctly here in the end.
hope someone is able to help me

Report
All responses (
Answers (