Save as question - InfoPath Dev
in

InfoPath Dev

Save as question

Last post 11-18-2008 05:00 AM by chandrakanth. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 11-17-2008 01:47 PM

    Save as question

    I have a question about some save as code I have listed below.

    Dim txtPath
    Dim txtName
    txtPath = "c:\"
    txtName = "test.xml"
    XDocument.SaveAS(txtPath & txtName)

     If I have a field called filename
    how would I set file name equal to ../@CheckNo

    Thanks in advance

    Randy

  • 11-18-2008 04:32 AM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694

    Hello,

    First you have to get the node and set the value for it using below the code.

    XMLNode fileNameNode = XDocument.DOM.selectSingleNode("<FileName node path>");

    //Here which value you want to set that value need to get first and assign that value to this node

    fileNameNode.text = "Node Value";

  • 11-18-2008 05:00 AM In reply to

    HI,

    Do you want to set the ../@CheckNo field value to the "filename" field?


      if yes ,Please implement the code given by shiva with a little change

    XMLNode fileNameNode = XDocument.DOM.selectSingleNode("<FileName node path>");
    XMLNode CheckNode = XDocument.DOM.selectSingleNode("<checkNo node path>");

    //Here which value you want to set that value need to get first and assign that value to this node

    fileNameNode.text = CheckNode.text;

       what you want is not the above mentioned one ,then please explain clearly about problem so that we can definitely help you.

    Chandrakanth/GGKTech
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.