Conversation started Dec 13, 2013 at 18:15.
Dec 13, 2013 18:15
@Malachi I think the XPath that selects your comment nodes should go in the Select Case part, like instead of
`Set ChildNodes = ServiceEventNodes(0).childNodes` you'd have
`Set CommentNdoes = ServiceEventNodes(0).SelectNodes(yourMagicXPathString)`
@SimonAndréForsberg and that's fine.. as long as things that should end up on meta, end up on meta :)
I am trying to eliminate the need for all of that with xPath.
Set CommentNodes = XmlDoc.SelectNodes("Record/CelloXml/Integration/Case/ServiceEvent[first()]/Service/Comment")
@retailcoder but the last() is throwing an error, do you see what I am doing wrong?
@Malachi [last()] looks right. But the /Service/Comment would then fail if there's no ServiceEvent node at all, no?
^^ fails for [first()] too
I think you should keep the if/else logic (or select case) with the "OLD" vs "NEW" thing, don't try to cram it all into an xPath, these things are a bitch + a half to debug...
@retailcoder yes, they both fail. if there is no ServiceEvent then they really won't be using this token. they are using it to return the comment because of something that created the comment
I had issues with the other ways i was doing it, it wouldn't return a single event correctly, the Business analyst caught that
 
Conversation ended Dec 13, 2013 at 18:21.