Getting data into a repeating table from Sharepoint lists in Infopath 2010 throwing invalid token error - InfoPath Dev
in

InfoPath Dev

Getting data into a repeating table from Sharepoint lists in Infopath 2010 throwing invalid token error

Last post 02-19-2013 04:14 AM by jovitech. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 02-11-2013 10:28 PM

    Getting data into a repeating table from Sharepoint lists in Infopath 2010 throwing invalid token error

    Hi All,

    I am using Infopath 2010 for creation and modification of employee details in my project.

    While modifying i am taking employee id and and department id (pls see below)

     XPathNodeIterator xDomNodesDeliverables = this.DataSources["EmployeeInfo"].CreateNavigator().Select("/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW[d:deptid= " + departmentid+ " and d:emid= " + empid+ "]", this.NamespaceManager);

    In the above, departmentid and empid are strings.When I try to modify i get the below error,

    /dfs:myFields/dfs:dataFields/d:SharePointListItem_RW[d:deptid=1450  and d:emid=0E691 ]' has an invalid token.
       at MS.Internal.Xml.XPath.XPathParser.CheckToken(LexKind t)
       at MS.Internal.Xml.XPath.XPathParser.ParsePredicate(AstNode qyInput)
       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.Select(String xpath, IXmlNamespaceResolver resolver)
       at _Clicked(Object sender, ClickedEventArgs e)
       at Microsoft.Office.InfoPath.Internal.ButtonEventHost.OnButtonClick(DocActionEvent pEvent)
       at Microsoft.Office.Interop.InfoPath.SemiTrust._ButtonEventSink_SinkHelper.OnClick(DocActionEvent pEvent)

    Pls help me resolve the issue.

    Thanks,

    Jovitech

  • 02-17-2013 01:07 PM In reply to

    Re: Getting data into a repeating table from Sharepoint lists in Infopath 2010 throwing invalid token error

    Hi Jovitech,

    Why are you trying to do this with code?

    Just copy the values into your form using a rule and a set value. Make sure the destination table has enough blank rows to handle - go to Default Values and add them.

    If you don't want blank rows in your form, you could insert the exact count needed using qRules and then use rules to copy the data across.

    No code means no development hassle for you and less maintenance cost.

    Patrick Halstead
    Project Manager at Qdabra
  • 02-19-2013 04:14 AM In reply to

    Re: Getting data into a repeating table from Sharepoint lists in Infopath 2010 throwing invalid token error

     Hi Patrick,

     Thank you for your reply. I have maintained everything in code.

    Since my project is in production. I will not be in a position to convert my code to rules etc. But I will try to implement the same in my future projects.

    Can you pls suggest me why I get this issue?

    Thanks and Regards,

    Jovitech

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