Help Filtering - InfoPath Dev
in

InfoPath Dev

Help Filtering

Last post 02-25-2009 08:13 AM by Jimmy. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 02-25-2009 07:49 AM

    Help Filtering

     I'm trying to filter using XPathNavigator.  The first statement returns all rows and I'm trying to change it so that it only return rows where the Machine Name field is equal to a predetermine value ("LRD1CTX16").

     

    For Each queryResultRow As XPathNavigator In queryDataFields.Select("*")

    For Each queryResultRow As XPathNavigator In queryDataFields.Select("* where Machine_Name = LRD1CTX16")

     

    Any help is appreciated.

  • 02-25-2009 08:13 AM In reply to

    I'm guessing it would be:

    For Each queryResultRow As XPathNavigator In queryDataFields.Select("*[my:Machine_Name = 'LRD1CTX16']")

    Though you may need a different namespace prefix (if that doesn't work try replacing my: with dfs:

    XML node selection uses a language called XPath, not SQL.  I recommend reading up on it a bit.  It'll help your InfoPath experience in the long run:
    http://www.w3.org/TR/xpath

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.