The following workflow is designed to loop through multiple List attachments, capture their URL
Declared 4 workflow variables using the variable types as shown below:
Here’s a screenshot of the workflow structure:
The actions are configured as follows:
The “Call web service” is using the Web_Url lookup then the /_vti_bin/Lists.asmx extension which is a mandatory field that represents the full URL of the SOAP Web service to call. Once a URL has been entered, the Refresh button can be pressed to define the available methods.
The parameters are stored within the var_AttachmentXML workflow variable.
The “Regular expression” action removes the XPath namespace (e.g. xmlns=”http://schemas.microsoft.com/sharepoint/soap/”) as leaving it in would make it more difficult to write the XPath expression.
The “Query XML” action is querying the XML variable using the XPath expression //attachments/attachment to pull out the value inside the Attachment XML node for each Attachment node then storing them in our defined collection variable var_CollectionURLs.
The “For Each” action is used to store the var_CollectionURLs variable data within a text variable to be used in the “Build Dynamic String” action for each attachment.
To print the urls and check use Log History
Happy Nintexing 🙂