Usage and example

To configure the dropdown web extension, you must specify these parameters:

  • Theme: Specifies the color theme. Options are "Vibrant" and "Subtle". "Subtle" is the default.
  • Mode: Specifies the color. The values are "Light", "Dark", "High Contrast", and "". The empty string value "" equates to "Light".
  • Label: Sets the label of the control. An empty string value "" hides the label, the required indicator, and the information icon with tooltip.
  • Item Data: Defines a table of items to show in the dropdown, with these columns:
    • Item ID. Use this column to define actions on selection changes
    • Item Caption
    • Selected (FALSE = empty string "" or TRUE)
    • Disabled. Optional column (FALSE = empty string "" or TRUE)
    • Visible. Optional column (TRUE = empty string "" or FALSE)
  • Multiselect: Specifies whether the dropdown allows single or multiple select. Use empty string "" or "FALSE" for single select and "TRUE" for multiple select.
  • Mandatory: Defines whether or not the selection of an element is required. If not provided, the default is "TRUE".
  • Information: Provides tooltip text for the Information icon. Empty string "" hides the information icon.
  • State: Defines the control state as "Enabled", "Disabled" or "Read-only". If not provided, the default "Enabled" is used.
  • Hint Text: Defines the hint text as a string, which is shown if no date is selected. Empty string "" shows the date format, which is dependent on the regional settings.

This example shows how to create a single select dropdown and store the selection in a report variable for further processing.

  1. Create an Application Studio report.
  2. Create a report variable named Selection.
  3. In the Properties - Report pane set the Immediate Writeback option to Automatic.
  4. Insert the Dropdown web extension in cells B2:D5.
  5. In the Format Web Extension dialog box specify these values:
    Theme
    Specify ="Vibrant"
    Mode
    Specify ="Light"
    Label
    Specify ="Position"
    Item Data
    Specify =B7:F11
    Multiselect
    Specify ="TRUE"
    Mandatory
    Specify ="TRUE"
    Information
    Specify ="You can select one or more positions"
    State
    Specify ="Enabled"
    Hint Text
    Specify ="Select positions"
  6. In cell range B7:F11 specify this sample table and its values:
    ID Caption Selected Disabled Visible
    Id1 Option 1 =GETPROPERTY(ReportVariables.Selection.Text,B8,"selected")="True" FALSE TRUE
    Id2 Option 2 =GETPROPERTY(ReportVariables.Selection.Text,B9,"selected")="True" FALSE TRUE
    Id3 Option 3 =GETPROPERTY(ReportVariables.Selection.Text,B10,"selected")="True" FALSE TRUE
    Id4 Option 4 =GETPROPERTY(ReportVariables.Selection.Text,B11,"selected")="True" FALSE TRUE

    The parameter Item Data is connected to this cell range. The status of each element is read from the table. In this example, all elements are enabled and visible. When an element is selected, only the selection status in column Selected changes. The GETPROPERTY function reads the current selection from the Selection variable.

  7. For each item in the Id column, define an action with these settings:
    • Actions
      Type
      Specify Set parameter
      Condition
      Specify =TRUE
      Mode
      Specify Web Extension
    • Parameters
      Name
      Specify reportvariable.Selection
      Property
      Specify Value(.Text)
      Value
      Specify =Actions.Input.Text
  8. Click OK.
  9. Save and view the report in a web browser.