Error on delete command with filter. - InfoPath Dev
in

InfoPath Dev

Error on delete command with filter.

Last post 08-29-2011 01:00 PM by shniggens. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 08-29-2011 11:04 AM

    Error on delete command with filter.

    I'm getting a wierd error when trying to delete a row from a table based on a value from another table. 

     

    My command is - concat("Delete /xpath=/my:myFields/my:Labor/my:MasterLaborCall/my:MasterLaborRepeating[../my:MasterLaborPerson=", Employee, "]")

     

    The error I get is -

    Action: Delete. Arguments: xpath: /my:myFields/my:Labor/my:MasterLaborCall/my:MasterLaborRepeating[../my:MasterLaborPerson=******] . Details: '/my:myFields/my:Labor/my:MasterLaborCall/my:MasterLaborRepeating[../my:MasterLaborPerson=*********]' has an invalid token.. Stack: 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.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 Qdabra.Tools.RulesLibrary.Commands.DeleteNodes(XPathNavigator dom, String xpath) at Qdabra.Tools.RulesLibrary.Commands.Delete() at Qdabra.Tools.RulesLibrary.Commands.ExecuteCommand()

  • 08-29-2011 11:57 AM In reply to

    Re: Error on delete command with filter.

    Since I'm guessing Employee is a non-numeric value, you need quotation marks around its value:

    concat("Delete /xpath=/my:myFields/my:Labor/my:MasterLaborCall/my:MasterLaborRepeating[../my:MasterLaborPerson='", Employee, "']")

    That's SINGLE QUOTE  DOUBLE QUOTE before the first comma, and DOUBLE QUOTE SINGLE QUOTE after the second comma.

    I'm also guessing that you shouldn't have that ../ before my:MasterLaborPerson.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 08-29-2011 01:00 PM In reply to

    Re: Error on delete command with filter.

    You were right about all of that.  Thanks.

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