Not applicable

## How to associate attachment to appropriate attachment control

Hi,

I am writing a console application that is importing data into a list that has associated Nintex form. Form itself has a several attachments sections.

I know how I can attach file itself to the list item, but I do not know how to associate concrete file to concrete attachment control.

Any idea/suggestion/workaroung?

4 Replies
Design Dabbler

## Re: How to associate attachment to appropriate attachment control

Marko,

As far as the separate attachment sections are concerned, they are defined in the Form data property of the Item. There will be separate Form Variables defined for each section. See example below where I added two attachment controls to the form - Attachments1 and attachments2. They contain string names of the attached files:

<FormVariables><Version /><Attachments1 type="System.String">attachment1.txt</Attachments1><attachment2 type="System.String">Attachment2.txt</attachment2></FormVariables>

Perhaps you could replace the relevant text in the Form Data to point it to the concrete file attached to the item. I have tried this, but just letting you know where the attachments are defined within the form.

Cheers,

Mark

Not applicable

## Re: How to associate attachment to appropriate attachment control

Hi Mark,

Ok, I will try to parse form's xml file and to replace those sections with my file names.

Cheers,

Marko

Design Dabbler

## Re: How to associate attachment to appropriate attachment control

Marko,

Sorry - I meant I haven't tried this. Good luck!

Cheers,

Mark

Not applicable