Load Form based on user input - InfoPath Dev
in

InfoPath Dev

Load Form based on user input

Last post 03-10-2011 09:07 AM by wbeard52. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 03-07-2011 02:23 PM

    Load Form based on user input

    I have a form that will load test questions from multiple tests.  I would like the user to select a test and only those test questions populate the rest of the form.  What is the best way of achieving this? 

    • Is it possible to change the SQL query at load time to only retrieve that one specific test?
    • Is it possible to have an initial view where the user selects the test to take and then the other view shows up?
    • Is it possible to create a form where the user can select the test and then pass that test ID to the InfoPath form?

    I am doing this all within InfoPath and the provided VB.net libraries.  I am working on providing an interface where the user can see the different tests they are requried to take and be able to select one to take.  I have the InfoPath form set up in such a way that when I pass the Test ID to the InfoPath XPath, the rest of the form configures itself appropriately using filters.

     Thanks for your willingness to help

  • 03-10-2011 09:07 AM In reply to

    Re: Load Form based on user input

    I've solved my dilemma... mostly.  The only issue is that now all of the tests and their data is loaded into every form slowing down how quickly the form loads and returns data.

    On the very top of my form I created the interface for the user to be able to select the test they want to take.  Below that I have the interface for the test itself.  Once the user selects the test via a command prompt, the @TestType node for the users test is populated.  This sets off a chain of events. 

    1. The selected test interface is hidden through a conditional format stating if @TestType is not blank then hide itself
    2. The repeating section defining the test questions and possible answers are populated via visual basic code (ran under the change event of the @TestType node) and filters on the controls
    3. The test interface is shown through a conditional format stating if @TestType is blank then hide itself.  Since it is no longer blank, the test interface is shown.

    When the user has finished taking the test and has submitted it.  The form is reopened and the user is again presented with the interface to select the test.  The difference this time, is the previously taken test has turned colors and the command button disabled indicating the test was previously taken.

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