Loading a Saved Set of Parameters

How to:

You can add the ability to save parameters to any application. The parameters are saved in sets. For example, you have a page that contains three parameter prompts, and you want to let your users resolve their favorite choices in one action, and/or have a default.

The Saved Set of Parameters facility lets you:

At design time, when creating an HTML page in the Content area, the following properties are available:

The Restorable Parameter Sets category on the Properties panel is shown in the following image.

Note: If you want to associate a trigger to invoke a JavaScript control that manages the saved sets of parameters, you can use the Saved sets of Parameters Action type in the Tasks and Animations panel.

Procedure: How to Create a Saved Set of Parameters

  1. Create a new HTML page.
  2. Open the Properties panel and pin it.
  3. Add a report to the HTML page, right-click the report, and select Import Existing Report from the shortcut menu.
  4. Select an existing report.
  5. Click OK on the New Parameters dialog box.
  6. Add a button to the HTML page.
  7. On the Properties panel, set the restorable parameters, as follows:
    1. Auto Restore Parameters Values to Yes.
    2. Parameter Page Name to Test.
    3. Maximum number of Saved sets to 10.

    The properties panel is shown in the following image.

  8. Open the Tasks & Animations panel and add a new task.
    1. Set Trigger Type to Click.
    2. Set Trigger Identifier to button1.
    3. From the Requests/Actions drop-down menu, select Saved sets of Parameters.

    The Tasks & Animations panel is shown in the following image.

  9. Save and run the report.
  10. Click the button.
  11. Add eight new Save Parameter settings, as shown in the following image.

    User Experience With the Save Parameters Dialog Box

    • Any saved sets of parameters display in the list box section of the Save Parameters dialog box. The user can select one and click the Load button on the toolbar to load those values into the controls.
    • Above the list box is an edit box where the user can type the name for the new saved sets of parameters to save, or existing saved sets of parameters to retrieve. Between the edit box and the list box is a toolbar with Save, Delete, Load, and Set buttons. The Set button is the default.
    • If the user saves a new saved set of parameters, and the name already exists, a message displays informing the user that the named set already exists. The user can click Yes to overwrite the file with the new values.
    • The user can select a saved parameter file in the list and click the Set as default button. This sets the default file to load when the page is invoked for the first time.
  12. Select midwest-gifts and click Set as default.
  13. Close the report and rerun it. Notice the default settings are Midwest and Gifts, as shown in the following image.
  14. Change the default to northeast-gifts.
  15. Close the report and rerun it. Notice the default settings are Northeast and Gifts.
  16. Close the report.

WebFOCUS

Feedback