Help me change code to VB - InfoPath Dev
in

InfoPath Dev

Help me change code to VB

Last post 10-05-2010 01:55 PM by Patrick Halstead. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 10-01-2010 01:22 PM

    Help me change code to VB

     I am trying to dynamically populate a drop-down list by calling a web service, I have this example:  http://support.microsoft.com/kb/826994

    but the code is vbscript or jscript, I need VB.  

     Can someone provide an example or help me change this to vb? 

     

    	Dim fieldValue
    set fieldValue = XDocument.DOM.selectSingleNode( "/my:myFields/my:field1" )

    'Get a reference to the SDS bound to the Web Service.
    Dim theDataObject
    set theDataObject = XDocument.DataObjects.Item("GetCities")

    'Set the SelectionNamespaces so that you can find the correct field.
    'Note: If the Web service was created with Visual Studio .NET 2003, the xmlns:s0 namespace is
    'http://tempuri.org/PopulateCities/Service1
    theDataObject.DOM.setProperty"SelectionNamespaces", _
    "xmlns:dfs=""http://schemas.microsoft.com/office/infopath/2003/dataFormSolution"" " &_
    "xmlns:s0=""http://tempuri.org/"""

    Dim queryValue
    set queryValue = theDataObject.DOM.selectSingleNode( _
    "/dfs:myFields/dfs:queryFields/s0:GetCities/s0:sState" )

    queryValue.text = fieldValue.text
    theDataObject.Query

     XDocument.View.ForceUpdate

     

     

     

  • 10-05-2010 01:55 PM In reply to

    Re: Help me change code to VB

    Hey Rob,

    This is like 10 lines of code. Surely, you can learn how to do this on your own. This forum is for people with InfoPath issues, not freeloading requests to people to do your work for you.

    Best,

    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.