Ask AI
Skip to main content

Set invalid message of selection field

Function: Set invalid message of selection field

This action allows you to display a custom error message next to a dropdown (selection) field on your application's screen. This is useful for guiding users when their input is incorrect or incomplete, or for clearing an existing error message once the issue is resolved.

Input

  • UI element (PART): The specific dropdown field on your screen where you want to display or clear an error message. This is a required input.
  • Invalid message (STRING): The custom text message you want to show as an error. If you leave this input empty, any existing error message for the selected dropdown field will be cleared.

Output

This action does not produce any direct output. Its effect is visible directly on the user interface by updating the specified dropdown field.

Execution Flow

Real-Life Examples

Here are some practical examples of how you can use this action in your application:

Example 1: Guiding users on an invalid selection

Imagine you have a dropdown for "Preferred Region" and a user selects an option that is temporarily unavailable. You can use this action to inform them.

  • Inputs:
    • UI element: Dropdown for "Preferred Region"
    • Invalid message: "This region is currently unavailable. Please choose another."
  • Result: The "Preferred Region" dropdown field on the screen will display the error message "This region is currently unavailable. Please choose another." below it, guiding the user to make a different choice.

Example 2: Clearing an error after a user correction

Suppose a user initially made an invalid selection, and an error message was displayed. Once they correct their input, you want to remove the error.

  • Inputs:
    • UI element: Dropdown for "Product Category"
    • Invalid message: \(Leave this field empty\)
  • Result: Any existing error message displayed for the "Product Category" dropdown field will be removed, indicating that the field is now valid and the user can proceed.

Example 3: Highlighting a missing required selection

If a dropdown field is mandatory, and the user tries to submit a form without making a selection, you can use this action to prompt them.

  • Inputs:
    • UI element: Dropdown for "Shipping Method"
    • Invalid message: "Please select a shipping method to continue."
  • Result: The "Shipping Method" dropdown field will show the error message "Please select a shipping method to continue.", clearly indicating to the user that this field requires an input before they can proceed with their order.