Site Workflow - Execute SQL and Populate List

  • 8 May 2019
  • 1 reply
  • 15 views

Badge +1

I am trying to create a site workflow to do the following:

 

1- delete all records from a list

2- execute a SQL query, to gather all records from a SQL table

3- get the results of the SQL query, and populate the list that was deleted in step 1

 

Step 1 - "delete multiple items" action?

Step 2 - Execute SQL action?

 

I think I've got those 2 sorted, it's just I'm not sure how to populate the sharepoint list with the data gathered from SQL.

 

The Sharepoint list matches the columns that the SQL query will gather.....any pointers?


1 reply

Userlevel 4
Badge +11

Hi,

 

you need to store data from columns returned by SQL Action in separate collection variables, then you can loop on a collection and get values from the other collection at the same index and create new item using the single data otherwise you can build the XML content that need to be passed to SharePoint list web service in order to create all items with one action..

Reply