SaveToSharePointList cant update metadata on file attachments - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

SaveToSharePointList cant update metadata on file attachments

Last post 11-27-2012 08:36 AM by Hilary Stoupa. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 11-26-2012 11:59 AM

    SaveToSharePointList cant update metadata on file attachments

    I have a form with 3 simple fields:  FName, LName, IncidentID.  The form can collect multiple attachments.  I want each attachment to be save on a custom list with the 3 metadata fields attached to it.

    Form Lib: frmTest  ->IP_Form:  FName, LName, IncidentID (autogenerated ID from date/time)

    Doc Lib: docTest -> docFName, docLName, docIncidentID (from form library frmTest)

    Custom List: docList -> lstFName, lstLName, lstIncidentID (from Form library frmTest)

     With my form, I can add the attachments and they will go into a document library.  The qRulesFilename and qRulesLink works great.  However, I'm struggling trying to get the metadata to update this document library for the attachments. 

    I have also tried to save the attachment to a custom list and use the mapping tool. This method, will add the attachment to the list, but it does not update the metadata either. 

    I've tried to follow the walkthrough for v4.2.  The UpdateListItems works when there is no attachments involved in the code

    Can you point me out on how I can debug the qRules with attachments? I'm using qRules v4.2.4652.28570 with SP 2010.

     thanks in Advance.

  • 11-26-2012 12:09 PM In reply to

    Re: SaveToSharePointList cant update metadata on file attachments

    Hi - yeah, SaveToSharePoint doesn't have an option to enter any meta data in the document library. So, using SubmitToSharePoint list is the only qRules option.

    To start debugging your command, the first thing is to put the QdabraRules Error node on your form and try executing the command. Are you getting any errors? If you attach your form to a reply (under the options tab) I can take a look at it as well...

    Hilary Stoupa

  • 11-26-2012 12:42 PM In reply to

    Re: SaveToSharePointList cant update metadata on file attachments

    Thanks for the prompt reply.  here is the simple form that i've been using.  I've put rules on the Add Attachment command.

    BTW, I do get errors about mappings, but I'm not quite sure what they mean. :(

    thanks,

    Arnulfo

     

  • 11-26-2012 12:43 PM In reply to

    Re: SaveToSharePointList cant update metadata on file attachments

    Wonderful - I'll take a look. Can you post the error you got about mappings? I might know what they mean. :-)
    Hilary Stoupa

  • 11-26-2012 01:22 PM In reply to

    Re: SaveToSharePointList cant update metadata on file attachments

    Hilary,  these are the parameters that I've been playing with:

    SubmitToSharePointList
            /submit=Sharepoint List Service Submit Connection Name
    [/mapping]=Mapping Data Connection Name - default is mapping
    [/mappingName]=Name of mapping to submit if not submitting all mappings in a mapping file
    [/id]=Path to Id field for SharePoint List Id (can be indicated in mapping file for 4.2 and later.)
    [/dsname]=Data Source For AddAttachment Method (SharePoint Lists Web Service)
    [/xpath]=XPath to attachment field  (pre-4.2 mapping - can be indicated in mapping file for v4.2 and later)
    [/name]=Name for file (extension will be added by qRules)
    [/uniqueName]=Prepend date and time information to the file name to provide a unique name (yes | no)

    and it seems, that I get any of the two errors:

    Error: The specified secondary DOM is not present.

    or the

    Failed to get mapping.

    :(

    thanks,

     Arnulfo

     

  • 11-26-2012 02:37 PM In reply to

    Re: SaveToSharePointList cant update metadata on file attachments

    I'm looking at your form and don't see where you are actually using the command - can you post the command syntax you were trying when you got the errors above?

    I'd expect you to use:

    SubmitToSharePointList /submit=ShPList /dsname=AddAttachmentCustom

    Oh! I see an error in your mapping file. You have mapped the Files node as both your ID and your attachment field. I'm attaching a copy of your template with that changed in the mapping file - save the file locally, then right click and select Design to open in design mode. From there you can preview the form, etc.

    Hilary Stoupa

  • 11-27-2012 05:22 AM In reply to

    Re: SaveToSharePointList cant update metadata on file attachments

    Good morning Hilary.  Thanks for the prompt reply.  My command is attached to the "Click here to attach a file" control. I have a "Send to media list" rule. You can disable the "Send to Media Library" and the "Upd library metadata" rules.

    let me try that new mapping and see if that works, I noticed that the attachment maps to the Files node. Now it makes sense, i'll try this and keep you posted

    thanks,

    Arnulfo

  • 11-27-2012 08:16 AM In reply to

    Re: SaveToSharePointList cant update metadata on file attachments

    Hilary, thanks for your time.  It was indeed the mapping file. I went back and redid my sample form with the correct mapping to the ID and Attachment fields.  It is now working!!  :)

    thanks

  • 11-27-2012 08:36 AM In reply to

    Re: SaveToSharePointList cant update metadata on file attachments

    Whoo hoo! Teamwork for the win, glad you have it working!
    Hilary Stoupa

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