File Attachment error - InfoPath Dev
in

InfoPath Dev

File Attachment error

Last post 10-05-2012 08:35 AM by Hilary Stoupa. 10 replies.
Page 1 of 1 (11 items)
Sort Posts: Previous Next
  • 10-01-2012 08:56 AM

    • Leinweber
    • Top 500 Contributor
    • Joined on 11-17-2011
    • Chicago, Illinois
    • Posts 26

    File Attachment error

    Hi. I am trying to submit a file attachment to a SP 2010 list using the AttachToSharePointList command found in qRules. I am going step by step through the documentation on how to do this (http://www.infopathdev.com/files/folders/qrules/entry59157.aspx) but get the following error:

    An error occurred adding the attachment: List does not exist. The page you selected contains a list that does not exist. It may have been deleted by another user.

     The list I have defined in the data connections exists. I have checked spelling and everything but continue to get this error.  Please help!

  • 10-02-2012 07:27 AM In reply to

    • Leinweber
    • Top 500 Contributor
    • Joined on 11-17-2011
    • Chicago, Illinois
    • Posts 26

    Please help!

  • 10-02-2012 07:35 AM In reply to

    Are you adding the attachment to an existing list item or using the command in conjunction with SubmitToSharePointList?

    Hilary Stoupa

  • 10-02-2012 12:23 PM In reply to

    • Leinweber
    • Top 500 Contributor
    • Joined on 11-17-2011
    • Chicago, Illinois
    • Posts 26

    Hi Hilary,

    I am attempting to use the command to insert a new item to a list. Do I need to use the SubmitToSharePointList command to first create an item in the list and then use the AttachToSharePointList command to add an attachment?

    -Steven 

     

  • 10-02-2012 02:34 PM In reply to

    You can use the SubmitToSharePointList command and include parameters to include an attachment with your list item. What version of qRules are you using?

    Hilary Stoupa

  • 10-03-2012 09:28 AM In reply to

    • Leinweber
    • Top 500 Contributor
    • Joined on 11-17-2011
    • Chicago, Illinois
    • Posts 26

    I am using Qrules version 4.0.

    My InfoPath form saves data to multiple SP lists. There is a primary list that stores some basic information returned from the InfoPath form. In addition to this, I have a secondary list in which I want to save file attachments. The secondary list has a column that stores the ID value from the primary list so multiple file attachments can be mapped back to the primary list. The secondary list is using primary lists ID value in the way a foreign key would be used in a database to map data to a primary table.

    When I submit my form, I have most of the data in my form being stored in the primary table and sent their via the SubmitToSharePointList command. From there, I am able to collect the SharePoint List ID from the primary list. I would like to take that ID and submit a repeating section of file attachments into the secondary list along with this ID. Should I use another SubmitToSharePointList command to submit the file attachments or am I on the right path with attempting to use the AttachToSharePointList command?

  • 10-03-2012 09:59 AM In reply to

    Well, let me clarify a few things first -

    1. The AttachToSharePointList command, on its own, requires an existing list item.
    2. You can include attachments with the SubmitToSharePointList command.
    3. List items allow multiple attachments.

    So, with that in mind, it seems like you would not need a secondary list for your attachments - why not just save them with your primary list item?

    To include attachments with your SubmitToSharePointList command, you need to include the following parameters:

     

    o dsname (optional): data source for AddAttachment Method (SharePoint Lists Web Service) – include if submitting attachments with your list items.

    o xpath (optional): XPath to attachment field.

     If you are submitting repeating data to the list, the /xpath parameter needs to be relative to the repeating node (like the /id parameter).

    Hilary Stoupa

  • 10-04-2012 02:10 PM In reply to

    • Leinweber
    • Top 500 Contributor
    • Joined on 11-17-2011
    • Chicago, Illinois
    • Posts 26

    Thank you for this suggestion. I think I am having trouble with the relative xpath I am using.  This is the xpath to my files (field2) is  /my:myFields/my:SupportDocumentation/my:group2/my:File_Attachment/my:field2). My form submits but no file attachments appear in the list. If /my:FileAttachment is the repeating node, would the relative xpath value be /my:field2?  

  • 10-04-2012 02:20 PM In reply to

    Is your mapping to group2? That is, are you submitting all the data in group2 to your list?

    If so, the relative path would be my:File_Attachment/my:field2 - it would need to be relative to group2.

    Hilary Stoupa

  • 10-05-2012 08:29 AM In reply to

    • Leinweber
    • Top 500 Contributor
    • Joined on 11-17-2011
    • Chicago, Illinois
    • Posts 26

    Hilary, you are my favorite person this morning! I finally have this working :)

     Thank you!

  • 10-05-2012 08:35 AM In reply to

    Hey, that's great! Glad you are up and running - have a great weekend.

    Hilary Stoupa

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