Show TOC

Displaying Controls Depending on a ConditionLocate this document in the navigation structure

Use

You can use a control selector to display one of several controls depending on a condition, for example, one of several images or one of several label controls with different texts.

This example explains how you use the control selector to depict the status of an object. You can depict status using green, yellow, and red symbols.

Procedure
  1. Create a schema element, such as Status .

  2. In the Edit form, create a group of radio buttons or a combo box with reference to the schema element that you created in step one.

    Enter a different value for each radio button or combo box entry in the value property , for example, red , yellow , and green .

    For more information, see Creating Checkboxes or Creating Groups of Radio Buttons .

    Note

    If you are using radio buttons, you can place the corresponding image of a red, yellow, or green traffic light next to each radio button to illustrate its use.

  3. In the Show form or RenderListItem form, create a control selector with a reference to the schema element that you created in step one.

    Use Drag&Drop with the secondary mouse button to copy the schema element to the form and choose Start of the navigation path Control Next navigation step Control Selector End of the navigation path in the context menu.

  4. To create images or texts, choose Create More Than One Image or Create More Than One Label in the context menu of the control selector.

  5. In the Condition property, enter the respective values for each control, for example, red , yellow , and green .

    Note

    To enter property values, select the control in question in the tree view of the controls.

  6. Specify the images or texts that you want to display in the properties of the controls:

    • For image controls, select the image to be displayed in the Image URL property.

    • For label controls, enter the text to be displayed in the Caption property.

More information

Control Selector