Retrieve null values from Sharepoint list through XpathNodeIterator - InfoPath Dev
in

InfoPath Dev

Retrieve null values from Sharepoint list through XpathNodeIterator

Last post 04-22-2013 01:45 AM by Jimmy. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 04-08-2013 05:11 AM

    • Rehman
    • Not Ranked
    • Joined on 05-16-2012
    • Posts 5

    Retrieve null values from Sharepoint list through XpathNodeIterator

     the below is the code i have written to retrieve the sharepoint list values, the values are pulling when no null values are there, if the null(empty) value in the list, throwing exception error. 

     xiRepatingTableDescriptions.Current.SelectSingleNode("my:HDDTemp_RowExported", ns).SetValue("Export Complete")
                                        'Set CAML query to insert new values to the 'Product Descriptions' sharepoint list
                                        DataSources(ExportedSharepointlistname).QueryConnection.Execute()
                                        xiPreviousProductDescriptions = Me.DataSources(ExportedSharepointlistname).CreateNavigator().Select("/dfs:myFields/dfs:dataFields/dfs:Product_Descriptions", Me.NamespaceManager)
                                                                          
                                         While (xiPreviousProductDescriptions.MoveNext())
                                           previousSKU = xiPreviousProductDescriptions.Current.SelectSingleNode("@SKU", ns).ToString()

                                                   

    can anyone help me on this?

  • 04-22-2013 01:45 AM In reply to

    Re: Retrieve null values from Sharepoint list through XpathNodeIterator

    How about something like this:

        While (xiPreviousProductDescriptions.MoveNext())
           Dim prevSkuNode as XPathNavigator = xiPreviousProductDescriptions.Current.SelectSingleNode("@SKU", ns)
           If prevSkuNode IsNot Nothing
              
    previousSKU = prevSkuNode.Value

    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.