cancel
Showing results for 
Search instead for 
Did you mean: 
cjones
Nintex Newbie

Have list item form attachments appear on task form

Jump to solution

I am trying to have links for the attachments on the original list item to appear on the task form during an "Assign Task" workflow action. I've followed this walkthrough, but this copies the files to another document library to just link them back to the task form. Can I simply place links on my task form directly back to the attachments? I'm able to get the File Names and URL's via the web request, but if there are multiple it will only capture the last (as it places them in the same variable). Any ideas?1.png

 

2.png

 

Labels: (2)
0 Kudos
Reply
7 Replies
Community Manager Community Manager
Community Manager

Re: Have list item form attachments appear on task form

Jump to solution

@cjones, unfortunately, this is not something that is done out of the box with Nintex or SharePoint.

 

I would have to ask why are you wanting to put the link on task form? I think querying the attachments, put them in a document library with a tag and then grabbing those links is the best way to tackle this.

0 Kudos
Reply
cjones
Nintex Newbie

Re: Have list item form attachments appear on task form

Jump to solution
The reason I would like to link them from their original location on the task form is because I find it redundant to copy the attachments to a document library to then just link to them there, when linking to them in their original location would suffice.
0 Kudos
Reply
Community Manager Community Manager
Community Manager

Re: Have list item form attachments appear on task form

Jump to solution

@cjones I understand it seems redundant, but attachments on list items do not operate in the same manner as documents in a document library. You have more control, access and features setup for the documents in a document library; whereas attachments are just files you can access via a REST call that gets complicated somewhat fast.

 

I wasn't suggesting your reason was not good, just stating that if you push those items to the document library, it actually makes your life easier getting the links to the documents and showing them on the form.

0 Kudos
Reply
cjones
Nintex Newbie

Re: Have list item form attachments appear on task form

Jump to solution

Oh I completely understand. In this situation though it just didn't make sense to go through all of that. The attachments are not edited through the process. If they need edited, the request is denied and they must submit a new item with the edited version. So sense the attachments are only viewed, just linking to them on the original list item would suffice. Thanks for your help though!

0 Kudos
Reply
Lucky
Nintex Newbie

Re: Have list item form attachments appear on task form

Jump to solution

Try doing below steps to your workflow.

  1. Create a Text Variable AttachmentsHTML (we build the html for existing attachments into this variable)
  2. In the loop action, after u get Name and url, use build string to build the html and append it to above variable. Some thing like: {Variable: AttachmentsHTML}<br/><a href="{Variable: Link}">{Variable: Name}</a>.
  3. Out put of above action is set to same variable.
  4. Now you will have all the attachments links in html structured  format
  5. In the Assign task / task proces, edit the form and use a "Caclualted Value" control, in the formula section, add the AttachmentsHTML variable..
Reply
patrickabel
Nintex Newbie

Re: Have list item form attachments appear on task form

Jump to solution

This is the same approach I've taken as well in order to provide direct links to attachments within task forms and email notifications.

 

I'd love for Nintex to build this into the product, but in the meantime you can workaround it by parsing XML, iterating your attachments (URLs and Names), and generating an HTML table which can be included in either.

 

Just remember that you'll have to re-generate these attachments between workflow approvals/stages or put yourself at risk for the attachments getting out of sync. 

0 Kudos
Reply
cjones
Nintex Newbie

Re: Have list item form attachments appear on task form

Jump to solution

This worked perfectly for what I need! The only thing I had to change was to put both the variable and link in seperate paragraph tags so they displayed a little nicer. For some reason the responsive form didn't like the line break. Anyways, thanks for your help! It was greatly appreciated. Below is what I ended up with in my "Build String" action. 

 

<p>{Variable: AttachmentsHTML}</p><p><a href="{Variable: Link}">{Variable: Name}</a></p>

0 Kudos
Reply