Insert data from GetListItems web service into repeating table - InfoPath Dev
in

InfoPath Dev

Insert data from GetListItems web service into repeating table

Last post 06-15-2007 12:00 PM by Matt Faus. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 06-14-2007 05:32 PM

    Insert data from GetListItems web service into repeating table

    I'm trying to put data I've retrieved from a getlistitems web service into a repeating table but I don't know how to iterate through the data to enter it in. Here is my code so far. Any help would be greatly apprecitated. Thanks!

    Dim xmlDoc As New System.Xml.XmlDocument

                Dim listName As String = "{9D39C54C-ABBB-4E79-A3DA-A781ADB09DF3}"
                Dim viewName As String = ""
                Dim rowLimit As String = ""
                Dim Unit As String = thisXDocument.DOM.selectSingleNode("/my:myFields/my:Unit").text
                Dim i As Integer


                Dim query As System.Xml.XmlElement = xmlDoc.CreateElement("Query")
                Dim viewFields As System.Xml.XmlElement = xmlDoc.CreateElement("ViewFields")
                Dim queryOptions As System.Xml.XmlElement = xmlDoc.CreateElement("QueryOptions")

       
                query.InnerXml = "<Where><And><Eq><FieldRef Name=""ContainerType"" />" + "<Value Type=""Text"">CM</Value></Eq><Eq><FieldRef Name=""Unit"" />" + _
                "<Value Type=""Text"">" + Unit + "</Value></Eq></And></Where>"
                'query.InnerXml = ""
                viewFields.InnerXml = "<FieldRef Name=""TrackingNumber"" /><FieldRef Name=""Unit"" /><FieldRef Name=""ContainerType"" /><FieldRef Name=""Active"" />"
                queryOptions.InnerXml = ""

                           Dim nodeListItems As System.Xml.XmlNode = listService.GetListItems(listName, viewName, query, viewFields, rowLimit, queryOptions)
                MsgBox(nodeListItems.OuterXml, MsgBoxStyle.Critical)

    Shaun Nieves
    Sharepoint Manager
  • 06-15-2007 12:00 PM In reply to

    Re: Insert data from GetListItems web service into repeating table

    Hi Shaun,

    I'm not too great at VB, but I can give you the general idea:

    1. Create an XmlNodeList object, and initialize it from the result of a GetNodes() function call
    2. Use the VB equivalent to a For Each to iterate over all the XmlNode objects in the XmlNodeList

    I don't know if this will help, but it's my best try with VB!

    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.