The first time I worked with attachments in a workflow, I ask where are the attachments stored and how can I show all attachments in the following workflow tasks to give an approver the possibility to read the attachments.
I have attached an NINTEX 2013 example site workflow using NINTEX Forms 2013.
A prerequisite is the installation of the Get List Item Attachment in Base64 Custom Action from Vadim Tabakman (see http://www.vadimtabakman.com/nintex-workflow-get-list-item-attachment-in-base64-custom-action-happy-...).
In the first Flexi Task you can add multiple attachments. The task IDs are stored in the workflow variable task_ids This attachments are stored in the task items of the Flexi Task.
If the Flexi Task is approved an item is created in a data list.
To copy the attachments from the task item(s) to the list item the following steps have to be executed in a loop for each task ID:
Now all task attachment are stored in the list item.
To show the attachments formatted as HTML links in the next Flexi task form the following steps have to be executed:
Now the html coding for the attachment links is ready to be rendered in the form of the next flexi task.
To show the links in the form I used a Rich Text control. My first attempt to enter the worklfow variable by Insert Referenz to the control was unsuccesful - the html coding was shown, not the rendered link. So a little JavaScript was neccessary. First I assigned a unique CCS Class name Anlagen to the control. Second I created a Single Line Textbox control where I inserted by Insert Referenz my workflow variable containing the html coding. The control itself was made invisible on the form by css. By JQuery the html content of the control will be replaced by the content of my workflow variable:
NWF$(document).ready(function () {
try {
NWF$('.Anlagen').html(NWF$('#'+ anlagen_html).val());
} catch (err) {
}});
Now the attachment links will be rendered:
I hope it is helpfull for someone!
Manfred
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.