I am trying to populate a list with links to download documents from a library in another site collection with a site workflow in Nintex workflow 2013 using the query list workflow action and a CAML query.
What is the best CAML query to use?
Will I have to use a regular expression to build up the link?
Would it be better to use the call web service workflow action instead?
I am using the following to get the title and URLs:
What I would do is go to the document library where you have the documents stored and build the query there. Basically you are making a temp workflow to just have the query action build the CAML Code for you. So add the Query List action to your canvas, select your list and set it up using the Query Builder. Once you have it how you would like then switch it over to the CAML view.
Now you will be able to copy/paste that CAML into your Query List Action within your site workflow where you are trying to build your list just make sure you choose Alternative Site and add in the URL to where the list of documents is. Store your query in a collection variable, then loop through the collection and build your list. To build your url you will need to create a string with the url,text.
Just need to make sure the user running the workflow has permission on both sites.
The better option would be to use a web service call and I would recommend using a service account with passwords that don't expire when using them, the 1st way is a work around for if your not comfortable with web services.
I hope this helps get you in the right direction.