Unable to Submit Info Path data to Form data to SharePoint List - InfoPath Dev
in

InfoPath Dev

Unable to Submit Info Path data to Form data to SharePoint List

Last post 11-08-2012 07:29 AM by Hilary Stoupa. 33 replies.
Page 1 of 3 (34 items) 1 2 3 Next >
Sort Posts: Previous Next
  • 10-29-2012 08:25 AM

    Unable to Submit Info Path data to Form data to SharePoint List

    Hello, I'm evaluating Qdabra rules for a client interested in the application and I'm having problems submitting data from an InfoPath form. I've followed all of the details on the video at http://www.qdabra.com/en/products/qRules_learn.aspx regarding "Submit to SharePoint Lists", but I'm still unable to submit successfully to a list. After setting up the connections and then I add a button and then set the the rule as advised in the video but I'm not having any luck. I've included a screenshot of the Rule that I've created. Is this the right format i.e. the data connection is LaptopSubmit, the XML file is called LaptopMapping and the SharePoint list is called LaptopReservations, and then I use "Title" as the ID field. Can you please let me know what I'm doing wrong as this could potentially resolve some issues that we have. Hope to hear back from you.
  • 10-29-2012 09:58 AM In reply to

    Re: Unable to Submit Info Path data to Form data to SharePoint List

    Hi there!

    So, if you are evaluating qRules, you are probably using 4.2 which may be a little different from the video you watched.

    But the first thing I'd recommend you do is add the Error node from the Qdabra Rules data source to your form someplace so you can see it. Then try your command again. Any errors?

    Hilary Stoupa

  • 10-29-2012 12:42 PM In reply to

    Re: Unable to Submit Info Path data to Form data to SharePoint List

    Hi Hilary, many thanks for your prompt response. Yes, I am using 4.2, Other than the video showing a manual mapping button, the details in the video are not so different and its a helpful video too.

    I entered the error node and on submission got this message  "Failed to select node for SharePoint List Id: /my:myFields/my:LaptopReservations/my:FormTitle"

    But I've followed the steps as directed so I'm not too sure why I get this error or what infact it means i.e. is it the list being incorrect, or the ID?

  • 10-29-2012 12:53 PM In reply to

    Re: Unable to Submit Info Path data to Form data to SharePoint List

    That error means the command can't find the field you've indicated. Try without the /id param and we'll add it back in when we have any other issues squared away.
    Hilary Stoupa

  • 10-29-2012 01:30 PM In reply to

    Re: Unable to Submit Info Path data to Form data to SharePoint List

    Hi Hilary. I edited the line like this

    SubmitToSharePointList /submit=LaptopSubmit /mapping=LaptopMapping /id=/my:myFields/my:LaptopReservations/

    This was the result:

    Action: SubmitToSharePointList. Arguments: submit: LaptopSubmit mapping: LaptopMapping id: /my:myFields/my:LaptopReservations/ . Details: Expression must evaluate to a node-set.. Stack: at MS.Internal.Xml.XPath.XPathParser.ParseNodeTest(AstNode qyInput, AxisType axisType, XPathNodeType nodeType) at MS.Internal.Xml.XPath.XPathParser.ParseStep(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseRelativeLocationPath(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseRelativeLocationPath(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseRelativeLocationPath(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseLocationPath(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParsePathExpr(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseUnionExpr(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseUnaryExpr(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseMultiplicativeExpr(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseAdditiveExpr(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseRelationalExpr(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseEqualityExpr(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseAndExpr(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseOrExpr(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseXPathExpresion(String xpathExpresion) at MS.Internal.Xml.XPath.QueryBuilder.Build(String query, Boolean allowVar, Boolean allowKey) at MS.Internal.Xml.XPath.QueryBuilder.Build(String query, Boolean& needContext) at System.Xml.XPath.XPathExpression.Compile(String xpath, IXmlNamespaceResolver nsResolver) at System.Xml.XPath.XPathNavigator.SelectSingleNode(String xpath, IXmlNamespaceResolver resolver) at Qdabra.Tools.RulesLibrary.Commands.GetValidNode(XPathNavigator dom, String xpath, String errorMessage) at Qdabra.Tools.RulesLibrary.Commands.CheckIdNode(XPathNavigator mappingNode, String id, Boolean isRefresh) at Qdabra.Tools.RulesLibrary.Commands.SubmitToSharePointList_Client(String submitDs, XPathNavigator mappingNode, String id, String attchDsname, String attchXpath, String attchName, String attchNameFormat) at Qdabra.Tools.RulesLibrary.Commands.SubmitToSharePointList() at Qdabra.Tools.RulesLibrary.Commands.ExecuteCommand()

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

    Re: Unable to Submit Info Path data to Form data to SharePoint List

    I was unclear. I meant for you to leave the /id parameter off entirely:

    SubmitToSharePointList /submit=LaptopSubmit /mapping=LaptopMapping

    When you mapped the form, did you use a repeating field? Is LaptopReservations repeating?

    Hilary Stoupa

  • 10-29-2012 02:26 PM In reply to

    Re: Unable to Submit Info Path data to Form data to SharePoint List

    Hi Hilary,

    I've removed the id parameter. The results this time are different. If I submit the record, it creates a new record in the list. However, trying to edit a record causes the following error message:

    The operation failed because an unexpected error occurred. (Result Code: 0x80020005)

    Also, there are no repeating field. If you want, I can send you the form itself.

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

    Re: Unable to Submit Info Path data to Form data to SharePoint List

    Hi -

    I'm guessing the error when you try to edit may have to do with a constraint on the list - I'm assuming you mean when you try to edit from InfoPath?

    Now that we know you can create a record, time to add that /id param back in. For the ID, you want to use a field you have not mapped. I'm wondering if in your original attempt, FormTitle was a field you have mapped to the list? Did you indicate a field as the ID in your mapping?

    Hilary Stoupa

  • 10-29-2012 03:07 PM In reply to

    Re: Unable to Submit Info Path data to Form data to SharePoint List

    Hi, there aren't any constraints on the list. All columns do not contain any special conditions. Yes, I'm trying to edit in InfoPath, so the drop down lists are already mapped to the SharePoint list so that they the data can be updated accordingly. I've added the parameter "Author" as an ID that wasn't mapped (FormTitle indeed had been mapped). Trying to submit to update shows this error message. Failed to select node for SharePoint List Id: my:myFields/my:Author
  • 10-29-2012 03:15 PM In reply to

    Re: Unable to Submit Info Path data to Form data to SharePoint List

    So - I'm a little confused. I'm not quite understanding your choice of fields for storing the id. The /id parameter (in the case where you have not mappped repeating data) should be the full XPath to a field in your form that you would like to have qRules use for the list item ID from SharePoint after your item has been successfully submitted.

    Usually, I just add a new field to the form's data source called "ShPId" or something - I'm thinking your "author" field is probably already being used for something....

    Mind attaching a copy of your form or even just the mapping to a reply, under the Options tab?

    Hilary Stoupa

  • 10-29-2012 03:27 PM In reply to

    Re: Unable to Submit Info Path data to Form data to SharePoint List

    Thanks. I have attached
  • 10-29-2012 03:41 PM In reply to

    Re: Unable to Submit Info Path data to Form data to SharePoint List

    Okay - so you were wanting the user to... be able to select from the "Form Title" drop down and edit an existing list item? As well as be able to submit new items to the list?
    Hilary Stoupa

  • 10-29-2012 03:53 PM In reply to

    Re: Unable to Submit Info Path data to Form data to SharePoint List

    Well, I will actually be configuring rules, so that when a user selects the laptop code drop down, the corresponding fields like Title, Laptop number, description etc will change (By filtering and setting the corresponding fields value). Users will not be able to create new records, they should only be able to update a record i.e. select an existing record and change the status field.
  • 10-29-2012 04:01 PM In reply to

    Re: Unable to Submit Info Path data to Form data to SharePoint List

    Got it. I'm attaching a form where I've made some changes. I've changed the "form title" dropdown to bind to a different field (ShPId) and am using the ID from the list as the value in the drop down now. Then, you'll see in the command, I'm using the ShPId field for the /id parameter.

    What should happen is that you'll select from an item that already exists in the list and that will set the ShPId field to an existing ID from the list. Then qRules, since you are using the /id parameter, will update the existing item (this is how we know which item to update). Looking at your original question, now that I've seen your schema, it appears that the XPath you were using for the /id parameter was not correct for your form's schema (that is, the field didn't exist).

    At any rate, save the form locally, right click and select design to open (forms hate being moved). Then you can save locally - preview and test, etc.

    Hilary Stoupa

  • 10-29-2012 04:37 PM In reply to

    Re: Unable to Submit Info Path data to Form data to SharePoint List

    Hi Hilary, Many thanks for helping me and also look at the form. May I suggest that this needs to be explained in more detail in the video / product notes in future. I have loaded it and tested it. It doesn't completely edit the existing records, so I think for now, I will start again by creating a new list and then add the fields one by one and then test them individually, that way I can see exactly what the problem maybe. I'll certainly be back, but once again, thank you so much. You've been so helpful.
Page 1 of 3 (34 items) 1 2 3 Next >
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.