Ask AI
Skip to main content

Add dropdown choice

Function: Add dropdown choice

This function allows you to dynamically add new options to an existing dropdown menu (also known as a select box or picklist) within your application. This is useful when you need to update the choices available to users based on certain conditions, data, or user interactions, without manually editing the form. For example, you might use this to add a new product category to a filter dropdown or a new shipping option based on a user's location.

Input

  • UI element (Required): This is the specific dropdown menu on your page where you want to add a new choice. You must select an existing dropdown field.
  • Code (Required): A unique identifier for the new choice. This is typically used internally by the system to reference the selected option. It should be a short, descriptive piece of text.
  • Label (Required): The text that users will see in the dropdown menu for this new choice. This is what appears in the list for selection.
  • Help information (Optional): Additional text that can be displayed to users, often as a tooltip or small note, when they hover over or interact with this specific choice in the dropdown.

Output

This action does not produce a direct output value. Instead, it modifies the specified dropdown UI element by adding the new choice to its list of available options.

Execution Flow

Real-Life Examples

Example 1: Adding a new product category to a filter

  • Scenario: You have an e-commerce application where users can filter products by category using a dropdown. A new product category, "Smart Home Devices," has just been added to your inventory, and you want it to immediately appear as a filter option.
  • Inputs:
    • UI element: "Product Category Filter" (the dropdown on your product listing page)
    • Code: "SMART_HOME"
    • Label: "Smart Home Devices"
    • Help information: "Browse our latest smart home gadgets."
  • Result: The "Product Category Filter" dropdown now includes "Smart Home Devices" as a selectable option, allowing users to filter products by this new category.

Example 2: Dynamically updating available shipping methods

  • Scenario: On an order form, you have a dropdown for "Shipping Method." Based on the user's selected delivery address (e.g., international), you want to add a specific shipping option like "International Express" if it wasn't initially available.
  • Inputs:
    • UI element: "Shipping Method" (the dropdown on your order form)
    • Code: "INTL_EXPRESS"
    • Label: "International Express (3-5 days)"
    • Help information: "Expedited shipping for international destinations."
  • Result: The "Shipping Method" dropdown on the order form now displays "International Express (3-5 days)" as an available choice for the user to select.

Example 3: Allowing users to suggest new tags for content

  • Scenario: You have a content management system where users can tag articles. While there's a predefined list of tags, you want to allow power users to suggest new tags that are immediately added to the tag selection dropdown for their current article.
  • Inputs:
    • UI element: "Article Tags" (the dropdown for selecting tags)
    • Code: "USER_SUGGESTED_TAG_AI" (assuming the user typed "AI" and the system generates a unique code)
    • Label: "AI"
    • Help information: (Left blank, as it's a simple user-suggested tag)
  • Result: The "Article Tags" dropdown now includes "AI" as a selectable tag, which the user can immediately apply to their article.