Extract Form name on_Load convert from 2003 to 2007 - InfoPath Dev
in

InfoPath Dev

Extract Form name on_Load convert from 2003 to 2007

Last post 08-25-2011 05:36 PM by captainradio. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 08-25-2011 05:36 PM

    Extract Form name on_Load convert from 2003 to 2007

    Hi everyone, I had written the following code a long time ago to extract the form name on load. The code was written in VB for Infopath 2003.

    I need to do the same thing for Infopath 2007 now and in C# Can you please help me translate the following code:

    Dim flag As Boolean            flag = thisXDocument.IsNew          
    If Not flag Then               
    Dim Submit As DAVAdapter
               
        
    Submit = thisXDocument.DataAdapters.Item("LFPM tracker")
           
            
    If thisXDocument.URI.StartsWith(Submit.FolderURL) Then
         
                  
    thisFilename = thisXDocument.URI.Substring(Submit.FolderURL.Length + 1)
       
                
    End If
                  
       
    PCCBNode = thisXDocument.DOM.documentElement.selectSingleNode("/my:myFields/my:PCCBFLag")
          
       
          Dim xmlNode As IXMLDOMNode
           
            
    xmlNode = thisXDocument.DOM.documentElement.selectSingleNode("/my:myFields/my:strFilename")
          
             
    xmlNode.text = thisFilename
                  
      
    If (thisFilename = "") Then
                
        Dim xmlNode1 As IXMLDOMNode         
     
    xmlNode1 = thisXDocument.DOM.documentElement.selectSingleNode("/my:myFields/my:ReadonlyFlag")
      
           xmlNode1.text = "true"
       
    thisXDocument.ViewInfos("Error").IsDefault = True        
            
    End If
                     
              
    End If
            
       
    e.ReturnStatus = True

    Any help will be much appreciated

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