Set value of chips input field
Function: Set value of chips input field
This action allows you to programmatically update the selected values (often called "chips") within a specific "Chips Input Field" component on your application's screen. Once updated, these new values are immediately reflected in the user interface and become available for other actions to use.
Input
- UI element The specific "Chips Input Field" component on your form that you want to modify. This is a visual part of your application where users can select multiple items, which appear as "chips." This input is required.
- Answers A list of values that you want to set as the selected "chips" in the chosen "Chips Input Field." These values will replace any existing selections in the field.
Output
This action does not produce a direct output value. Instead, it updates the specified "UI element" on your application's screen, and the new values are stored within the application's context for further processing by subsequent actions.
Execution Flow
Real-Life Examples
Here are some practical ways you can use the "Set value of chips input field" action in your application:
Example 1: Pre-filling user preferences based on their profile
Imagine you have a user profile form where users select their "Interests" using a Chips Input Field. When a user revisits the form, you want to pre-populate their previously saved interests.
- Inputs:
- UI element:
Interests_Chips_Field(the specific Chips Input Field on the form) - Answers:
["Technology", "Reading", "Hiking"](a list of interests retrieved from the user's profile data)
- UI element:
- Result: The
Interests_Chips_Fieldon the form will automatically display "Technology", "Reading", and "Hiking" as selected chips, allowing the user to easily review or modify them.
Example 2: Clearing selections in a filter field
You have a product catalog with a "Categories" filter, implemented as a Chips Input Field. You want to add a "Clear Filters" button that resets all category selections.
- Inputs:
- UI element:
Product_Categories_Filter(the Chips Input Field used for category selection) - Answers:
[](an empty list, indicating no selections)
- UI element:
- Result: When the "Clear Filters" button is clicked, the
Product_Categories_Filterwill have all its selected chips removed, effectively clearing the filter.
Example 3: Dynamically setting tags based on a text input
Consider a task management application where users can enter a task description. You want to automatically suggest and set relevant tags in a "Tags" Chips Input Field based on keywords found in the description.
- Inputs:
- UI element:
Task_Tags_Field(the Chips Input Field for task tags) - Answers:
["Urgent", "Development", "Bug"](a list of tags generated by analyzing the task description, e.g., if the description contained "fix bug" and "high priority")
- UI element:
- Result: The
Task_Tags_Fieldwill be populated with "Urgent", "Development", and "Bug" as selected tags, helping the user categorize their task quickly.