Sometimes the data that you need for your business process lives in a separate site or site collection than the one where you are building your Nintex Workflow. Fear not! You don’t have to get up to your neck in the CAML Editor of the Query List action to extend the functionality. Allow me to show you how!
Step 1 – Create a workflow in your source site
Navigate to the site where your data lives and open a new workflow in the Nintex Workflow Designer. This can be a site workflow or a list workflow on any list.
Step 2 – Configure your Query List action via the Query Builder
Add a Query List action to your new workflow and configure it to get the information you need by using the handy-dandy Query Builder (no coding required!).
PRO TIP: Be sure to specify and output fields that you want to return from the query. When you copy this CAML query over to your destination workflow, it will save you a step or two.
Step 3 – Copy the CAML query
Once you’ve got the query configured as needed, switch to the CAML Editor and copy the full CAML query that has been automatically generated.
Step 4 – Paste the CAML query in the destination workflow
Now, navigate back to the site where you need to use the data and open your workflow. Add a Query List action and switch to the CAML Editor. Delete the existing CAML query and replace with the CAML query from your source workflow.
NOTE: If you specified output fields in your source query, it may take a moment (or you may need to click outside of the CAML query section) for the output fields to update. You may see the message below and the the fields should appear at the bottom of the configuration dialog box.
Step 5 – Specify the Alternative Site in the Query List action
Enter the Site URL in the Alternative Site field in the CAML Editor.
PRO TIP: Store this value as a Workflow Constant for ease of use and maintenance.
Step 6 – Assign variables to store output values
Select appropriate workflow variables to store the output field values returned by the query.
And voila! No need to do a deep dive into learning the ins and outs of CAML querying – unless you’re looking for a fun new hobby 😉
Happy Nintexing!