Check field - InfoPath Dev
in

InfoPath Dev

Check field

Last post 03-27-2008 02:01 AM by Roberto. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 03-26-2008 10:06 AM

    Check field

    Hello,

    I insert a Custom Button into infopath module and I enable this Button only if all  fileds of infopath module are not empty. I tried to do this work programmatically working with sampledata.xml to check fields value

     

    IXMLDOMDocument2 oSampleData = (IXMLDOMDocument2)thisXDocument.CreateDOM();

    oSampleData.async =
    false;

    oSampleData.load("sampledata.xml");

    oSampleData.setProperty("SelectionNamespaces", "xmlns:my=\"http://my\"");

    IXMLDOMNode oSampleNode = oSampleData.selectSingleNode("/my:campiPersonali/my:campo1");

    this.thisXDocument.UI.Alert(oSampleNode.text);

    but I get this error :

    Object reference not set to an instance of an object.
       at InfoPathProject2.InfoPathProject2.stampaButton_OnClick(DocActionEvent e) in c:\......
       at Microsoft.Office.Interop.InfoPath.SemiTrust._ButtonEventSink_SinkHelper.OnClick(DocActionEvent pEvent)

    What I can do ? 

    Thanks,Roberto

     

  • 03-26-2008 10:30 AM In reply to

    Have you tried this with conditional formatting rather than code?

    It is pretty straightforward and easy that way.

  • 03-27-2008 02:01 AM In reply to

    I want to perform a dynamic control. I don't know the number of filed in the module first, so I can do this check dynamically

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