Hi everybody...
I would like to ask some help for this scenario below:
I have an InfoPath 2010 Form with a attachment control inside of a repeating table.
At the first fill of the form, this control are showed and all users can upload files. After the first submit, I use Nintex Workflow 2010 ("Copy to SharePoint" action) to send all attachments to a library and return the folder's url to the form (because, after this step, all users will work with the document library to manage all attachments - so, I hide the attachment control of the InfoPath, for users not work with the same anymore).
Until here, all process works fine!
To complete my scenario, I want to remove all attachments of the InfoPath form (to compact the size of the xml). I know that all attachments into InfoPath are base64 encoded. I don't want to implement code into my InfoPath Form template.
So, I try to use the "Update XML" Nintex Workflow Action to remove the attachments of the form.
See below all tries that I did:
1)Passing a Empty Value: I configured the action to pass no value. All the attachments were deleted. But the workflow notified me a error. I received this message: "The workflow could not update the item, possible because one or more columns for the item require a different type of information".
2)Passing a Empty Variable (text with one line): I create a variable with the type "text with one line" without value (empty). All the attachments were deleted. But the workflow notified me a error. I received this message: "The workflow could not update the item, possible because one or more columns for the item require a different type of information".
3)Passing a Empty File: In my case, as I will hide the Attachment Control, if I replace all files with a empty file, it will solve my problem. I try to update the file, passing a base64 Encode of a empty file "x0lGQRQAAAABAAAAAAAAAAUAAAAUAAAAQQB0AHQAYQBjAGgAbQBlAG4AdABFAG0AcAB0AHkALgB0AHgAdAAAAEVtcHR5" but the workflow replace all attachments but presents a workflow error, with the same messagem "The workflow could not update the item, possible because one or more columns for the item require a different type of information.
4) As Adictional Test ...Passing the xml InfoPath node of a form without attachments: I create a item (using the same template there I want to remove all attachments) and, using the windows explorer view of the library, I edited the xml item into the notepad and i took the node of the attachments without a file.
<my:Anexo xsi:nil="true"></my:Anexo>
So I passed this part as a parameter into the "Update XML Action". And I configured the xpath without the last one nivel. It not worked. It broken the Form Schema. But if I configure this ...to add a child node...the action insert a line into the repeating table with a attachment control (without a file).
So...parting of these tests, I would like to ask some help for one of this solution:
a. Which parameter do I have to pass in my "Update XML" Action to delete all attachments?
b. Which parameter (base64) do I have to pass in my "Update XML" Action to replace all attachments?
c. Is there another way to remove or replace all attachments using Nintex Workflow (another action)?
Thanks
Best regards
Douglas Akioka