Dropdown

Article • 02.08.2022 • 7 minute(s) to read

Dropdowns allow Users to select one value from a predefined list of options. The list of options can be entered in the properties, it can be automatically generated from Attributes with a Lookup or from a Data Query. In any case, the Data Type of the value must match with the Data Type of the Variable or Attribute backing the Dropdown. Be aware, that the Data Type my be a Reference.

Dropdown allows only the section of one value. Multiselect can be used if multiple values should be selected. Furthermore, if you use a Radio instead of the Dropdown, all options are visible and not only the selected option.

Sometimes other Form Controls need check if the User have already selected a value from a Dropdwon. This can be done by Form Control Expression
$[DropdownIdName]==null || $[DropdownIdName]=='',
where DropdownIdName has to be replaced with the Id / Name of the Dropdown. Inside a Grid the same logic applies, but the Form Control Expression changes to
$[GridId.DropdownIdName][_index]==null || $[GridId.DropdownIdName][_index]=='',
where GridId is the Unique identifier of the Grid.

Control properties

  • Id / Name - Identifier of the Form Control. Id / Name needs to be unique for all Form Controls on the same Form. Id / Name also binds the Form Control to an Attribute with the same name of the Variable backing the From. This means that the Form Control will load and show the value from said Attribute when the Form is entered, and that the value of the Form Control is stored in the Attribute when the Form is left by a Save or Sign and Save action. The Form Control can also be bound to an Attribute of a Variable other than the one backing the From by using the fully qualified name as Id / Name:

    A detailed explanation of the different linking mechanisms between a Form Control and an Attribute is given in the Variable and Variable Type configuration of the From Activity.

  • Label text - Caption rendered above the Form Control thus identifying it to the Users.

  • Caption - Text shown while no option of the Form Control is selected.

  • Help text - Explanation of the Form Control shown below the Form Control.

  • Default value - Default value loaded when the Form is entered and no value is available from the linked Attribute.

  • Enable conditional mandatory validation? - This property is similar to the Is field mandatory? property, but allows you to specify a condition determining when the Form Control becomes mandatory. If Enable conditional mandatory validation? is set to No this property is disabled. If set to Yes, a condition can be entered determining when the Form Control becomes mandatory. When the condition evaluates to true, the Form Control cannot be left empty or unspecified in case a Save or Sign and Save Action is triggered. Dismiss and Sign Actions do not enforce the mandatory condition. However, it does not matter if the value was entered by the User or did already existed in the Attributes backing this Form Control, but it just has to exists. When List of values? is set to Yes, this property is ignored.

    • Condition for is mandatory - When this Form Control Expression evaluates to true, the Form Control becomes mandatory. An asterisk in front of its label indicates if the Form Control is currently mandatory.
  • Is field mandatory? - When set to No, the Form Control can be left empty or unspecified. When set to Yes, the Form Control cannot be left empty or unspecified. The Actions Save or Sign and Save enforce this condition, while Dismiss and Sign Actions do not enforce it. If set to Yes, it does not matter if the record is entered by the User or did already existed in the Attribute backing this Form Control. Mandatory Form Controls are indicated by an asterisk in front of their label. This property is only available if Enable conditional mandatory validation? is set to to No. When List of values? is set to Yes, Is field mandatory? is ignored and the Require at least one record? property of the LIST CONFIGURATION has to be used instead.

  • Disable control? - Makes the Form Control editable (No) or read-only (Yes). Be aware that the content of read-only Form Controls is not stored by Save and Sign and Save Actions in the linked Attribute.

  • Hide control? - Hides (Yes) or shows (No) the Form Control in the Form. Be aware that the content of hidden Form Controls is stored by Save and Sign and Save Actions in the linked Attribute.

  • Condition type - Allows you to hide or disable the Form Control based on a Form Control Expression evaluating to true or false:

    • Display - Hides the Form Control when the Form Control Expression evaluates to false and shows it when the Form Control Expression evaluates to true. Be aware that the content of hidden Form Controls is stored by Save and Sign and Save Actions in the linked Attribute.
    • Disable - Makes the Form Control editable when the Form Control Expression evaluates to false and makes it read-only when the Form Control Expression evaluates to true. Be aware that the content of read-only Form Controls is not stored by Save and Sign and Save Actions in the linked Attribute.
    • Display condition or Disable condition - The Form Control Expression behind the condition
  • List of values? - Form Control represents an array (Yes) or a single value (No). Form Controls of arrays have two additional properties:

    • Require at least one record? - Specifies if the array can be empty (No) or must have at least one record (Yes). This property is equal to the Is field mandatory? property of non-array values. The Actions Save or Sign and Save enforce this condition, while Dismiss and Sign Actions do not enforce it. If set to Yes, it does not matter if the record is entered by the User in the current session or did already exist in the array backing this Form Control. An asterisk next to the title indicates to the Users, that this property is set to Yes and at least one record is required.
    • Disable delete? - When set to No, all entries in the array backing the Form Control can be deleted. If set to Yes, only new entries entered by the User in the current session can be deleted but entries already in the array cannot not be deleted.
  • Use Data Source? - Specifies if the list of values are automatically generated from a data source (Yes) or if they have to be input manually (No).

    • When a data source is used, several properties need to be set:
      • Data source type - The Form Control can be populated by the Entities of a specific Entity Type, or by the results of a Data Query. Both cases offer similar, yet not identical properties:
        • Entity type properties:
          • Source - The Entities of this Entity Type are loaded into the Form Control.
          • Display attribute - Attribute of the selected Entity Type shown in the Form Control. This can be equal or different than the Value attribute.
          • Value attribute - Attribute of the selected Entity Type used as the result value of the Form Control. This can be equal or different than the Display attribute.
          • Filters - Only those Entities of the selected Entity Type matching these filters are shown on the Form Control. If no filters are configured, all Entities are shown.
            • Add filter - Creates a new filter
            • Attribute - Selects the Attribute this filter is applied on.
            • Value - Only Entities with a matching value in the selected Attribute will pass the filter. The value can be entered directly or as a Form Control Expression.
            • - Delete filter
        • Data Query properties:
          • Data Query - Results of this Data Query are loaded into the Form Control.
          • Display column - Result column of the selected Data Query shown in the Form Control. This can be equal or different than the Value column.
          • Value column - Result column of the selected Data Query used as the result value of the Form Control. This can be equal or different than the Display column.
          • Parameters - Any parameters the Data Query requires, can be set here. These parameters are typically used by the Data Query to filter the results.
            • Add parameter - Creates a new parameter
            • Name - Name of the parameter as specified by the Data Query
            • Value - Value of the parameter passed to the Data Query, entered either directly or as a Form Control Expression.
            • - Delete parameter
    • When no data source is used, the options have to be entered manually:
      • Add option - Creates a new option
      • Label - Name of the option shown to the Users
      • Value - Internal values representing the option, can be equal or different than the Label.
      • - Delete option
In this article