Multiple Attachment controls to save in list using SubmitToSharePointList - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Multiple Attachment controls to save in list using SubmitToSharePointList

Last post 04-27-2018 10:15 AM by Hilary Stoupa. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 04-19-2018 03:30 PM

    Multiple Attachment controls to save in list using SubmitToSharePointList

    Hello,

    Hope you can assist me with this question, how is it possible to save attachments in a list item. To consider also that the second control is in a repeating section

      

     

    I tried but it only extracted & saved the first attachment, is it because of the mapping or attachment control in the list?

     

      Hope this is not a limitation, thank you!


  • 04-26-2018 08:01 AM In reply to

    Re: Multiple Attachment controls to save in list using SubmitToSharePointList

    Can I see your form? You can attach it under the Options tab - I don't think this is a limitation - I was pretty sure we picked up all instances of the attachment field, but I can double check the code.
    Hilary Stoupa

  • 04-26-2018 04:05 PM In reply to

    Re: Multiple Attachment controls to save in list using SubmitToSharePointList

    Hello, Thank you for getting back to me. I attached the form.

    The code is in 'Button' and 'Button' - I tried to hide it first in production.

     Many thanks! 

  • 04-26-2018 05:04 PM In reply to

    Re: Multiple Attachment controls to save in list using SubmitToSharePointList

    So - you have two different fields mapped as attachments. Did you try with just the repeating one mapped? Everything else looks right to me. I took a look at the code too & it should be looping through all instances of the attachment node and attaching all of them. Your first button command looks fine - you could leave off the /mapping parameter since your mapping data connection is named mapping. I'll set up a little repro tomorrow and see if I have different results.
    Hilary Stoupa

  • 04-27-2018 10:15 AM In reply to

    Re: Multiple Attachment controls to save in list using SubmitToSharePointList

     Ok - the issue is with your mapping. However, using the union operator seemed to work! So, manually modify your mapping.xml file to remove one of the attachment mappings and set the other to union the two nodesets together:

       <Mapping>
          <FormField IsRichText="false" IsId="false" IsAttachment="true" IsDate="false" IsParentId="false">my:AttchDiscipline | my:group28/my:group29/my:AttchEvidence</FormField>
          <SharePointColumn />
        </Mapping> 

    Hilary Stoupa

Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.