AnsweredAssumed Answered

XPath query is invalid. Expression must evaluate to a node-set.

Question asked by tposzytek Champion on Nov 24, 2016
Latest reply on Nov 27, 2016 by tposzytek

I'm having an Infopath form which is having sections numbered from 0 to 14. They are being filled based on some rules. I'd like to use a "Query XML" action to get only those having values in nodes <ID{n}> (where {n} is the next number from 0 to 14). I'm then using the following XPath query:

//my:Approvals/*[starts-with(name(), 'my:Approve')][*[starts-with(name(), 'my:ID') and text() >= 0}]]

When I'm testing the query using the http://www.xpathtester.com/xpath tester it returns me 3 nodes.

However when I execute my workflow processing the actions logs error message:

 

XPath query is invalid. Expression must evaluate to a node-set..

 

I have no idea how to debug what this action is returning or what am I doing wrong, when on the other hand XPath tester tells me everything should be correct...

 

I highly appreciate any help

 

Best regards,

Tomasz

Outcomes