The following workflow was designed to loop through multiple List attachments, capture their URL, then embed them into a “Request Approval” action so that approvers can open the attachments from the email notification in Edit mode then modify them without having to access the List item directly from SharePoint. 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. The “Build Dynamic String” action uses the var_AttachmentURL data and converts it into a URL that can be embedded into the email notification. (Note that this is a part of the “For Each” action, so it will continue to loop through all List attachments.) {WorkflowVariable:var_AttachmentLinks} à this is being included so that the previous loop’s data is not overwritten <a href="{Common:WebUrl}/_layouts/nintexworkflow/opendocforedit.aspx?doc={WorkflowVariable:var_AttachmentURL}&page={Common:WebUrl}&close=true">{WorkflowVariable:var_AttachmentURL}</a> à This string builds the URL so that it can be opened in Edit Mode within the email notification. Additionally, it includes HTML tags so that the URL will be displayed as a hyperlink. (This is really necessary if spaces were included in your site/list name as spaces will sometimes break hyperlinks. The “Request Approval” action includes the var_AttachmentLinks within the “Edit Approval Required Notification” body which will now reflect all attachment links. Again, these links will open in Edit Mode from the email making this process easier for approvers. Note that you will want to also update the Approvers field on this action so that it reflects the correct approvers.
Nintex would like to place cookies on your computer to improve your browsing experience. The Nintex website uses cookies for the following reasons:
If you do not wish to allow cookies from this website, you may configure your browser so that you are notified before a cookie is downloaded or so that your browser does not accept cookies.