Show TOC Start of Content Area

Function documentation Control Selector  Locate the document in its SAP Library structure

Use

You use a control selector on Show or List forms to display one of several images or texts according to a condition.

Example

For example, you can display a red, yellow, or green light depending on the status of a document.

Features

A control selector is a placeholder for several controls, one of which is displayed according to a condition.

You place a control selector on a form in the XML Forms Builder. You assign several controls to the control selector and define a condition for each control determining when it should be displayed.

When an XML document is displayed with the form, the system selects the control whose condition is met and depicts the relevant content on the screen.

Defining a Condition

The control selector must have a reference to a schema element or document property. To determine which control is displayed, the system compares the value of the referenced element with the value of the control property Condition.

The condition is true if the value of the referenced element matches the Condition value.

Regular Expressions

You can use regular expressions in the control selector with the pattern that is written in the table below.

Example of Regular Expression

 

Activities

Proceed as follows to create a control selector:

...

...

       1.      Use Drag&Drop to place a schema element or document property onto a form using the secondary mouse button.

       2.      Choose Control Control Selector from the context menu.

       3.      To create controls, click on the control selector using the secondary mouse button and choose one of the entries from the context menu.

       4.      Click on the individual controls in the tree view of the controls, and create a value for the property Condition for each of the controls.

Note

Some control properties can be defined for both the control selector and for the individual controls. In this case the value of the control selector is the default value, which you can override in individual entries.

See also:

Example: Depicting Status with the Control Selector

End of Content Area