cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Copying items between lists while preserving attachments

Jump to solution

Hi guys,

We have two separate lists, one for unassigned tasks (let's call it List A) and another (more secure, let's stretch the imagination and call that one List B.) for assigned tasks. Both have the same structure, but List B has some extra fields to show who the item is assigned to, etc.

Items in these lists are uniquely identified with a generated ID. We have a workflow which is supposed to move items between these lists and we've tried the following approaches:

1) Create a new item in List B with the same ID as the source item in List A, then pull all the fields from List A's item into the workflow and throw them into List B's fields.

     -    This works great and all the fields carry over into the new List B item with the exception of the attachment. We then can't select           List A's Attachment field in Nintex to carry that over in the same fashion. Bit of a showstopper.

2) Copy the item from List A to List B as a whole.

     -    This seems to carry over the attachments and most of the fields, but some columns are blank and Nintex won't allow us to work           around this by just selecting these columns as a destination when updating a list item.

So it seems our choice at the moment is either "Have your attachment, or have your data."

Has anybody come across this before and could give us a gentle nudge in the right direction?

Thank you in advance,

Michael Davies

0 Kudos
Reply
3 Replies
mapeacock
Nintex Newbie

Re: Copying items between lists while preserving attachments

Jump to solution

Michael,

We had a lot of issues with Attachments and having visibility of any attachments added to various tasks along a path of a workflow. Attachments added to an initial item form were fine and easily accessible on the list, but attachments added by other tasks purely reside in the workflow task  item - as you no doubt know.

What we eventually did was to add actions in the workflow to assess if there were any attachments associated with a workflow task and if so copy the attachments to a document library and subsequently tagging the documents in that library with all the necessary identifiers to indicate where the doc has come from and what initial list item it was related to. This then allows you to build into your workflow forms a view of the document library listing all the attachments associated with the item.

There was a lot of mucking around, but it involved calling a workflow from the original list workflow via the Call Web Service, to run on the relevant Workflow task list to grab the attachments off the task and copy them to the Document library.

I hope that gives you a bit of direction perhaps? There may be easier ways to do it, but at the time I could not find them!

Cheers,

Mark

0 Kudos
Reply
Not applicable

Re: Copying items between lists while preserving attachments

Jump to solution

If you view the list in Windows Explorer (open a doclib in Explorer, navigate up and go to Lists/your list) you'll see that there is an Attachments folder. In the attachments folder you'll see another set of folders. Each folder represents an item ID.

I think you have to use a webservice to copy the attachments. Let's say the ID of the source item is 29 and the ID of the destination item is 12. You need to copy the files inside the /Attachments/29/ folder to the Attachments/12 folder of your destination list. Any files inside the Attachments folder will automatically show up in the item's view form.

0 Kudos
Reply
Not applicable

Re: Copying items between lists while preserving attachments

Jump to solution

Hi Jordy - I am having trouble getting the webservice to copy the files from the explorer. It is an unknown error, not set to an instance of an object. Which method should we be using?

Any help is greatly appreciated! - Tarre

0 Kudos
Reply