Secondary data source - InfoPath Dev
in

InfoPath Dev

Secondary data source

Last post 04-09-2007 03:36 AM by B.Shiva Prasad. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 04-03-2007 07:20 AM

    Secondary data source

    How can I acess a fild of secondary data source with code?

    I am trying with:

    eventObj.Source.parentNode.selectSingleNode("../nmCoordenacao").text

    But I don´t have sucess...

    This is a picture of my secondary data source
    http://quickload.hostingvision.com/images/2787InfoPath%20secondary%20data%20source.JPG

    Thanks

  • 04-03-2007 11:40 PM In reply to

    • shekar
    • Not Ranked
      Male
    • Joined on 07-26-2006
    • India
    • Posts 22
    Hi

    Can you tell me what error or reason for not accessing the field from the secondary data source.
    Shekar
    http://www.ggktech.com
  • 04-04-2007 02:33 AM In reply to

    Hi shayken,

    Do like this, create a dom and load the secondary xml in that. From that you can get the data what ever you want.

    see the below code.

    IXMLDomDocument <docName> = thisXDocument.createDOM();
    <docName>.Load(“xml file”);

    by using <docName> you retrieve the node value what ever you want.

    Hope this will help you.
    B.Shiva Prasad
    InfoPath Dev,
    http://www.ggktech.com
    India
  • 04-04-2007 06:01 AM In reply to

    Shekar,

    whith this, I get "null"
    XDocument.GetDOM("getCoordenacao").selectSingleNode("/tns:getCoordenacaoResponse/getCoordenacaoResult/NewDataSet/CS_COORDENACAO/nmCoordenacao")

    And with this, I get "objetc expected"
    XDocument.GetDOM("getCoordenacao").selectSingleNode("/tns:getCoordenacaoResponse/getCoordenacaoResult/NewDataSet/CS_COORDENACAO/nmCoordenacao").text

    Shiva,
    the (“xml file”) is my Secondary data source?



    Obs: this Secondary data source is a webservice...
  • 04-09-2007 03:36 AM In reply to

    Hi shayken,

    Try with the full XPath "/myFields/dataFields/tns:getCoordenacaoResponse/getCoordenacaoResult/NewDataSet/CS_COORDENACAO/nmCoordenacao" in the second example

    other wise put one more "/" before the XPath.

    Hope this will help you.
    B.Shiva Prasad
    InfoPath Dev,
    http://www.ggktech.com
    India
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.