Ask AI
Skip to main content

Get label of dropdown field

Function: Get label of dropdown field

This action helps you retrieve the visible text (label) of the option currently selected in a dropdown menu on your application's screen. You can then use this label in other parts of your application, like displaying it in a message, saving it to a database, or using it in a calculation.

Input

  • UI element: This is the specific dropdown menu on your application's screen from which you want to get the selected label. You must select a UI element that is configured as a "Dropdown Field."

Output

  • Answer label: This is the variable where the retrieved label (the visible text) of the selected dropdown option will be stored. By default, this variable is named DROPDOWN_FIELD_ANSWER, but you can rename it to something more descriptive for your needs. The stored value will be a piece of text.

Execution Flow

Real-Life Examples

Example 1: Displaying a selected country

  • Scenario: A user selects a country from a dropdown list on a registration form, and you want to display the full country name in a confirmation message.
  • Inputs:
    • UI element: Country_Dropdown (a dropdown field on your form)
    • (Output variable Answer label will default to DROPDOWN_FIELD_ANSWER)
  • Result: If the user selected "United States" from the Country_Dropdown, the variable DROPDOWN_FIELD_ANSWER will contain the text "United States". You can then use this variable in a text display element or a notification.

Example 2: Filtering products by category

  • Scenario: On an e-commerce site, a user selects a product category from a dropdown, and you want to use that category name to filter a list of products.
  • Inputs:
    • UI element: Product_Category_Dropdown (a dropdown field on your product listing page)
    • (Output variable Answer label will default to DROPDOWN_FIELD_ANSWER)
  • Result: If the user selected "Electronics" from the Product_Category_Dropdown, the variable DROPDOWN_FIELD_ANSWER will contain the text "Electronics". This value can then be used in a "Filter Data" action to show only electronic products.

Example 3: Updating a task status

  • Scenario: In a project management application, a user changes the status of a task using a dropdown, and you want to record the new status as a readable text.
  • Inputs:
    • UI element: Task_Status_Dropdown (a dropdown field on a task detail page)
    • (Output variable Answer label will default to DROPDOWN_FIELD_ANSWER)
  • Result: If the user selected "Completed" from the Task_Status_Dropdown, the variable DROPDOWN_FIELD_ANSWER will contain the text "Completed". This text can then be saved to the task's status field in your database.