How to upgrade a Nintex for Office 365 workflow to Nintex Workflow Cloud that uses the action, Execute SQL.
Ensure that you have a SQL Server connection configured in your Nintex Workflow Cloud environment that points to the data source you want to query.
- Your start event Connection property will need to be updated with an existing connection to SharePoint in your Nintex Workflow Cloud environment.
- The Execute SQL action will become Microsoft SQL Server - Execute a query in Nintex Workflow Cloud.
- The new action will need to be reconfigured.
- Instead of entering direct text for the connection string property you will select an existing SQL Server connection from your environment.
- The Results count and Retrieved column values properties are combined into an Object variable that can be accessed throughout other actions in the workflow.
- The Results in XML property is not supported.
- Create a connection to your Microsoft SQL Server instance by using the proper SQL Server connector. In this example, we use the Microsoft SQL Server connector to connect to an Azure SQL database.
- Reset the Connection property in your start event to point to an existing SharePoint connection. By doing this first, other SharePoint related actions may automatically use this connection later in the workflow when you reconfigure them.
- Configure the connection property of the Microsoft SQL Server - Execute a query action by using the connection created if you followed step 1 above.
- Enter your SQL query into the SQL script text box as shown in the image below.
- Enter the column you would like to retrieve from your query into the Column to retrieve text box.
- You can create a result object variable to store your query results. Access values from the data source using this variable.
- Use the values from the result object variable in later actions for your workflow. This can be found in the Microsoft SQL Server variable context area. Notice in the image below you get the results count as an integer variable along with the Retrieved column collection variable, which contains values from the data source.