Workflow Soluiton

 View Only

Hiding and Showing a Webforms Component (Setting the Visible Property) 

Jul 29, 2009 12:06 PM

You can hide or show almost any Webform component in Workflow Designer. Almost every Webform component has a Visible property that controls whether a component is hidden or shown on a run-time Webform. All components are always shown during design-time.

The following screenshot shows the Visible property on a label component:

Setting the Visible property on a component

You can set the Visible property on a Webforms component in the component's editor. Double-click the component to open its editor. The Visible property appears under the Functionality tab.

In a Webform component's editor there is an ellipse next to the Visible property. If the property is set to False, the component will never be shown on the form. If the property is set to True, the component will always be shown on the form. Clicking the ellipse lets you set the property to either true or false. You have three options for setting the Visible property: Process Variable, Dynamic Model, and Constant Value.

To set the Visible property with a process variable

Setting the Visible property with a process variable means you use a Logical (true/false) variable in your project to determine the value of the Visible property on the Webforms component. Use the process variable option when the visibility decision is too complex for a constant value but not complex enough for a dynamic model. For example, if you have a Logical (true/false) variable in your project called IsShown, you can set the Visible property on a Webforms component to use the value of IsShown to determine its own value. If IsShown was set to True in the process, the Visible property would be set to True. If IsShown was set to False, the Visible property would be set to False.

  1. In a Webform component (Form Builder, Terminating Form Builder, etc.), double-click the Webforms component you want to configure.
  2. In the Functionality tab, click the [...] button on the Visible property.
  3. Click Process Variables, and then click Add.
  4. Select the Logical (true/false) variable that you want to use to control the visibility of the Webforms component, and then click OK.

    You can select only a Logical (true/false) variable. Variables of other types are not available for you to select.

  5. (optional) Set the default value. The default value determines the visibility of the Webforms component if the process variable you selected does not exist or has no value at run-time.
  6. Click OK.

    The name of the process variable you selected appears for the value of the Visible property.

To set the Visible property with a dynamic model

Setting the Visible property with a dynamic model means you use a model that you create to determine the value of the Visible property on the Webforms component. Use the dynamic model option when the visibility decision is too complex for a single process variable or constant value. For example, if you want to set visibility based on the value of a number of variables in your process you can create a dynamic model with some decision-making components (such as Decision Path or Decision Tree) to analyze the variables in question and return a true/false result. The dynamic model must have two end components: one set to True and one set to False.

  1. In a Webform component (Form Builder, Terminating Form Builder, etc.), double-click the Webforms component you want to configure.
  2. In the Functionality tab, click the [...] button on the Visible property.
  3. Click Dynamic Model, and then click Edit.
  4. Create a model that analyzes the variables necessary to determine the visibility of the component.

    Create a model that uses two End components: one set to True and one set to False.

    To set an End component to true or false, do the following:

       a. Double-click the End component to open its editor.
       b. Click the [...] button for the component mapping property.
       c. Click Create Value.
          Wait for the Value check box to appear.
       d. In the Value check box, set the value to true or false.
          Check to set the value to true; do not check to set the value to false.

       e. Click OK to exit the value mapping.
       f. Click OK to exit the editor.
  5. When you are finished with the dynamic model, click OK to exit the dynamic model editor.
  6. Click OK to exit the Visible property editor.
  7. Click OK to exit the Webform component editor. [Dynamic Model] appears for the value of the Visible property.

To set the Visible property with a constant value

Setting the Visible property with a constant value means you set an unchanging value to determine the value of the Visible property on the Webforms component. Use the constant value option when the visibility should constantly be set to false. If it should constantly be set to true, you do not need to configure the visibility setting at all. The component is visible by default. But if you want to set the component not to show, set the constant value to false. For example, you might want to set a component's visibility to false if you do not want to currently use the component but you do not want to delete it.

  1. In a Webform component (Form Builder, Terminating Form Builder, etc.), double-click the Webforms component you want to configure.
  2. In the Functionality tab, click the [...] button on the Visible property.
  3. Click Constant Value, and then set a value in the drop-down list.

  4. Click OK.

    The value you selected appears for the value of the Visible property.

Statistics
0 Favorited
0 Views
5 Files
0 Shares
4 Downloads
Attachment(s)
jpg file
949961-01.jpg   40 KB   1 version
Uploaded - Feb 25, 2020
jpg file
949961-02.jpg   34 KB   1 version
Uploaded - Feb 25, 2020
jpg file
949961-03.jpg   17 KB   1 version
Uploaded - Feb 25, 2020
jpg file
949961-04.jpg   23 KB   1 version
Uploaded - Feb 25, 2020
pdf file
VisibleProperty.pdf   217 KB   1 version
Uploaded - Feb 25, 2020

Tags and Keywords

Related Entries and Links

No Related Resource entered.