SubmitToSharePointList- How to specify a node for the list ID that is not in the root? - InfoPath Dev
in

InfoPath Dev

SubmitToSharePointList- How to specify a node for the list ID that is not in the root?

Last post 09-12-2012 11:03 AM by Hilary Stoupa. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 09-12-2012 08:54 AM

    • DC Forms
    • Top 150 Contributor
      Male
    • Joined on 06-14-2012
    • Washington, DC
    • Posts 76

    SubmitToSharePointList- How to specify a node for the list ID that is not in the root?

    I have a form that will submit a single list item to SharePoint. I have a group titled "helperFields" with a field "listID" that I want mapped by qRules to the target SharePoint list ID column. The examples I've seen all use a node in the root (/id=my:id). What is the syntax for specifying a node in a group using the SubmitToSharePointList command (e.g. /id=my:helperFields/my:listID)?

  • 09-12-2012 08:59 AM In reply to

    Re: SubmitToSharePointList- How to specify a node for the list ID that is not in the root?

    When you created the mapping - did you select the repeating group option? If not, use the full XPath to the field. If so, use the relative XPath from the repeating group. Attach your mapping XML if you'd like me to take a look.

    Hilary Stoupa

  • 09-12-2012 09:51 AM In reply to

    • DC Forms
    • Top 150 Contributor
      Male
    • Joined on 06-14-2012
    • Washington, DC
    • Posts 76

    Re: SubmitToSharePointList- How to specify a node for the list ID that is not in the root?

    I did not select the repeating group option when creating the mapping.

    When using the full XPath, /id=my:helperFields/my:listID, I get the error Failed to select node for SharePoint List Id: my:helperFields/my:listID.

    My mapping file is attached. The command be executed is:

    SubmitToSharePointList /submit=SharePointFullSubmit /mapping=DDE-Note_Form-Mapping /id=my:helperFields/my:listID 

  • 09-12-2012 10:10 AM In reply to

    Re: SubmitToSharePointList- How to specify a node for the list ID that is not in the root?

    That doesn't appear to be the full XPath - isn't the root "debtNote"? Is "helperFields" a child of "debtNote"?

    /id=/my:debtNote/my:helperFields/my:listID

    Hilary Stoupa

  • 09-12-2012 10:33 AM In reply to

    • DC Forms
    • Top 150 Contributor
      Male
    • Joined on 06-14-2012
    • Washington, DC
    • Posts 76

    Re: SubmitToSharePointList- How to specify a node for the list ID that is not in the root?

    The root is debtNote and helperFields is a child that contains the field listID.

    I had thought I would use /id=/my:debtNote/my:helperFields/my:listID, but when I am working in InfoPath and choose to edit XPath it uses /my:helperFields/my:listID. Quirk? Feature? Just plain wrong?

    id=/my:debtNote/my:helperFields/my:listID works. Thanks Hilary.

  • 09-12-2012 11:03 AM In reply to

    Re: SubmitToSharePointList- How to specify a node for the list ID that is not in the root?

    In InfoPath, you could right click the node in the data source task pane and use Copy XPath to get the full path.

    Hilary Stoupa

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