In Nintex for SP2013/2016 in on-prem there is the action "Copy to SharePoint" which basically does the thing - it allows to copy attachments from particular XML nodes from Infopath form into a chosen SharePoint library.
In O365 there is no such thing.
I did some deeper analysis on the issue and realized, that:
Has anyone got a similar problem? If so - how have you solved it?
Solved! Go to Solution.
The most important thing why it is done this way, is that client was using that approach for years on his SP2010 env. and now decided to move to O365. I've made a PoC with SharePoint List, with attachments and Infopath form, together with REST copying the list attachments to a separate library - it works fine.
However the original form contains 3 separate sections for attachments, and when working with list item, you can have only one "attachment" section in the form. And there is no way (or at least I'm not familiar), how to workaround it
At the risk of over-complicating the process, if the form has 3 sections, could it be broken into 3 forms?
In the past, for complicated processes that contained lots of data, we had created 3 content types in a list and created a separate Nintex form for each of them. Use an Identifier column (PK) to create a link between the 3 content types for one instance and this allows us to query the list to find the list item that corresponds to the current item.
ID Content Type1 Content Type2 Content Type3
1 PK = 101
2 PK = 101
3 PK = 101
Content Type 1 would be the first section and would allow you to have it's own attachment which could then be copied to a document library using web services and then Content Type 2 would be the second section and so forth.
3 separate items linked by a unique identifier in the same list.
I know this doesn't resolve your issue but it could be an approach to consider.
Ryan Greenaway, this is an interesting approach however I need those three sections in one form. And from I know this is not possible for a list - it has to be done as a custom infopath form as my client is doing already. After all the process is not complicated. Additional attachments' sections are just optional, to allow storage of some optional files.
Right now I'm briefing a developer to create a remote event receiver that will take the attachments out of the infopath, decode and upload to another library, but I'm still looking for an alternatives. And currently the most suitable one is to use a list, create a form for it in the infopath (but resigning from additional attachments), and then use Nintex "HTTP Request" action to move attachments from the list to a library using REST API.
Right. So just to follow up the question with the answer:
Because in my case client does not want to go into Azure subscription, we decided... err... to just resign from additional attachments' sections, create a LIST and redesign the form on the list. Then, when workflow runs, it just calls list REST API and uses "O365 Upload a file" to copy-paste attachment files to a particular library.