I've added the Attachments form control to the Task form, but when accessing a task it just shows an Add Attachment button. It does not list anything currently attached to the item. Am I doing something wrong here? Do I need to use a different control or a workaround to get current attachments to show on the Task form?
Solved! Go to Solution.
This is because a task is a separate list item to the list item your attachment belongs to. Under the Workflow Tasks list, you will find your task and this illustrates it's a completely independent item in a different list.
If you wanted to just provide a link to the attachment I think you can add a calculated value and use the Attachments property under Item properties to retrieve the URL.
I haven't tested this, but give it a try and report back.
I wish. Unfortunately, all it returns is:
it seems really weird you have to build something custom to link to attachments from the item on the task item.
alternative is to use the Hyperlink control in View Mode and build the url yourself.
The url will be "https://domain/sites/sitename/lists/listname/attachments/ID/attachmentname.doc
all the bold elements are obviously to be replaced by you, the ID is the list ID of the item that the attachment is associated with and then obviously the attachment name and extension. You could build this as a variable in your workflow and then reference the variable in your hyperlink field.
I'm liking this idea, but how would I gather the attachment name.extension into a variable? Especially in the case of multiple attachments?
I thought maybe I do a collection and set the value to a List Lookup for the Current Item field Attachments. When I do that, and then log to history I still only get the "True"message.
Sorry, should have detailed that.
In this blog I've written we query the formData XML using the Query XML action. This allows us to store the filenames in a collection as you require.
Have a read through and let me know if you need anything explained further for you, but hopefully it should make sense which bits of the blog you need to use and adapt.
So I figured, instead of doing all this, I'm just going to use a Rich Text field and link back to the original form. This is just way too much of a workaround to do something as simple as displaying attachments from the form. I love everything about Nintex Forms and Workflows so far but this seems like something Nintex would have implemented/fixed a long time ago.