Hello, i wish to join an attachment into an element of list personnalized since a library of document. i don't how find to make it. Than you for your returns
I'm sorry, but I'm not understanding your question. Could you perhaps include specific details in an example?
For example, I created a list with an order that starts a workflow which creates an invoice in PDF format in a Sharepoint Library. I would like to be able to create a command in my worklow that allows me to search this invoice then put it as an attachment in my list.
Ok, I think I understand now.
You have List A, which is where you have a workflow that runs on an item (Invoice123) in the list and creates a PDF from it. This PDF (Invoice123.pdf) is then stored into Library B. You then want Invoice123.pdf from Library B to be attached to your Invoice123 in List A. Does this sound correct?
If my understanding is correct, I would suggest creating a workflow on Library B that runs when a new PDF is added. The workflow will use a Query List action to query List A for the correct invoice and retrieve the invoice ID. Then the workflow will use a Call Web Service action to call the Lists.asmx web service and run the AddAttachment operation.
<m:listName>List A</m:listName>
<m:listItemID>{ID of Invoice in List A}</m:listItemID>
<m:fileName>{ItemProperty:FileLeafRef}</m:fileName>
<m:attachment>[FileData]</m:attachment>
m:listName should be the name of the list whatever your List A is.
m:listItemID is the ID that will be returned from your Query List action and stored in a variable so insert the reference to your ID variable.
m:fileName is just the Name reference of the current document. {ItemProperty:FileLeafRef} = Name
And lastly, m:attachment will be set to base64Binary when you first select AddAttachment. This wants a base64 string, which is automatically created for the current document when you enter uFileData].
Hopefully that helps.
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.