How to programically display a section as part of form submission (FormEvents_Submit) - InfoPath Dev
in

InfoPath Dev

How to programically display a section as part of form submission (FormEvents_Submit)

Last post 08-02-2011 09:10 AM by Hilary Stoupa. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 07-29-2011 07:58 PM

    How to programically display a section as part of form submission (FormEvents_Submit)

    Greetings,

    I am using InfoPath 2007 and have created a form that has a section that I want hidden until the user clicks the "Submit" button, upon which I want the following to occur as part of form submission:

    1) The 'hidden" section to be displayed

    2) This "updated" form is emailed to the user (* haven't coded this 2nd part yet *)

    I have learned that I need to imbed this code in the "FormEvents_Submit" area of my code (I am using C#).  So far this is what I have:

    public void FormEvents_Submit(object sender, SubmitEventArgs e)

    {

    // Get a reference to the main data source

    XPathNavigator trackingSection = MainDataSource.CreateNavigator().SelectSingleNode("/my:NLD_Training_Request_Form/my:TelusEmployeeSectionOrNotMainSection/my:TelusIDorNotChoiceMainSection/my:TELUSIDorNotHeaderSection/my:TrackingNumberSection", NamespaceManager);

    CurrentView.SelectNodes(trackingSection,trackingSection, "CTRL9");

    CurrentView.ExecuteAction(ActionType.XOptionalInsert, "group1_263");

    }

    -------------

    But I am getting the following error at run-time:

    Only XPathNavigators from a DataObject are allowed.
    Parameter name: startNode 

    Any Ideas?

    Derek

    CAREER SUMMARY

    Accomplished, energetic Information Technology professional with over 14 years of experience developing and implementing test strategies, operational procedures, and quality methodologies to support development and release of business applications. A hands-on leader with a proven ability to direct and improve quality programs, reduce defects, and improve overall efficiency and productivity. Extensive Business Analysis and Project Management knowledge, coupled with the ability to train, lead, and motivate effective cross functional teams.

    * Waterfall, Agile (SCRUM)
    * Release Management
    * PeopleSoft
    * Telecommunications
    * Automation
    * Quality Centre/ALM
    * ITIL
    * Metrics/Scorecards

    TECHNICAL SKILLS

    * Programming:
    - Visual Basic, C/C++, Java, Perl/CGI, Tcl/Tk, XML, RSS

    * Databases:
    - Oracle RDBMS, SQL, mSQL, MS Access

    * Operating Systems:
    - HP-UX, Solaris, Linux, Windows XP, Vista, 7, Mac OS X, Windows Mobile 2003, PocketPC Phone Edition, Symbian, Blackberry, PalmOS, J2ME mid-p devices

    * Protocols / Technologies:
    - HL7, iPTV, IMS, 3GPP, SIP, Diameter, TCP/IP, OSI, PPP, 802.11, UMTS, GPRS, EDGE, GSM, CDMA-1xRTT, EV-DO, WiFi, Bluetooth, IrDA, SONET/SDH, DWDM

    * Software Products:
    - PeopleSoft, Quick Test Pro, Quality Center/ALM, WinRunner, WebLogic, Sun ONE iPlanet, Visio, MS Project, SharePoint, HP Universal CMDB, HP Service Manager
  • 07-31-2011 10:39 PM In reply to

    Re: How to programically display a section as part of form submission (FormEvents_Submit)

    There's no need to use code to show a hidden section.  Just create a field in your form called Submitted that you set to true when the form is submitted.  Then conditionally hide the hidden section based on the value of the Submitted field.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 08-02-2011 08:58 AM In reply to

    Re: How to programically display a section as part of form submission (FormEvents_Submit)

    Hi Jimmy.,

     Thanks for responding.  Can you provide more details on how to do this?  I am still learning how to use InfoPath?  How do I set the Submited field to "True" when the form is submitted?

    Cheers,
    Derek 

     

    CAREER SUMMARY

    Accomplished, energetic Information Technology professional with over 14 years of experience developing and implementing test strategies, operational procedures, and quality methodologies to support development and release of business applications. A hands-on leader with a proven ability to direct and improve quality programs, reduce defects, and improve overall efficiency and productivity. Extensive Business Analysis and Project Management knowledge, coupled with the ability to train, lead, and motivate effective cross functional teams.

    * Waterfall, Agile (SCRUM)
    * Release Management
    * PeopleSoft
    * Telecommunications
    * Automation
    * Quality Centre/ALM
    * ITIL
    * Metrics/Scorecards

    TECHNICAL SKILLS

    * Programming:
    - Visual Basic, C/C++, Java, Perl/CGI, Tcl/Tk, XML, RSS

    * Databases:
    - Oracle RDBMS, SQL, mSQL, MS Access

    * Operating Systems:
    - HP-UX, Solaris, Linux, Windows XP, Vista, 7, Mac OS X, Windows Mobile 2003, PocketPC Phone Edition, Symbian, Blackberry, PalmOS, J2ME mid-p devices

    * Protocols / Technologies:
    - HL7, iPTV, IMS, 3GPP, SIP, Diameter, TCP/IP, OSI, PPP, 802.11, UMTS, GPRS, EDGE, GSM, CDMA-1xRTT, EV-DO, WiFi, Bluetooth, IrDA, SONET/SDH, DWDM

    * Software Products:
    - PeopleSoft, Quick Test Pro, Quality Center/ALM, WinRunner, WebLogic, Sun ONE iPlanet, Visio, MS Project, SharePoint, HP Universal CMDB, HP Service Manager
  • 08-02-2011 09:10 AM In reply to

    Re: How to programically display a section as part of form submission (FormEvents_Submit)

    Submit using rules - then in your rules, you can use an action rule to set the field's value.

    Hilary Stoupa

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