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

Comparing SQL results to list contents

I am trying to build a site workflow that would run nightly that would pull a SQL table,  compare the results to a SharePoint table and add any new items to the list.  The basic SQL pull and item creation are not issues - we do this type of thing regularly.  The thing I'm struggling with is how to make sure I don't create items that already exist in SharePoint. 

 

Does anyone have any suggestions on the best way to approach this? 

 

One thing I tried was pulling a column of the SQL table into a collection and the corresponding column of the SharePoint list into a collection. I then used a For Each to go through the SQL collection and a Run If to attempt to only do the create if the column value was not contained in the SharePoint list collection.  That didn't seem to work - the items were all created every time workflow ran. 

 

I appreciate any assistance you can offer.  Thanks!

Labels: (1)
0 Kudos
Reply
2 Replies
Not applicable

Re: Comparing SQL results to list contents

I solved my own problem.  I used the collection operation and 'exists' option.  I'd tried this earlier and couldn't figure it out. It turns out I had mistakenly set the one collection variable to to the wrong variable type so things weren't working correctly.

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Comparing SQL results to list contents

Hi Troy,

I am kind of trying to complete the same as above, but I am very new to Nintex so learning as I go.

I want to query a SQL Table for any entries which are over 7 days old and update an existing SharePoint list with the new entries.

I have the part working which queries the SQL TABLE but I am stuck now on how to store the results so I can update the SP List.

Would you have any guidance ? A collection operation is mentioned but I cant seem to figure that out

Thanks

0 Kudos
Accept as Solution Reply