Ask AI
Skip to main content

Set value of chips input field

Function: Set value of chips input field

This action allows you to programmatically set the selected "chips" or tags within a Chips Input Field on your application's form. This is useful for pre-filling data, updating selections based on other actions, or clearing the field. The updated values are then available for subsequent actions or saving within your application.

Input

  • UI element (Required): This is the specific Chips Input Field component on your form that you want to modify. You'll need to select or reference this component from your application's design.
  • Answers: This is a list of text values that you want to set as the selected "chips" in the chosen Chips Input Field. Each item in this list will become a separate chip. For example, ["Tag1", "Tag2"]. To clear the field and remove all existing chips, provide an empty list (e.g., []). If no list is provided at all, the action will not proceed and will result in an error.

Output

This action does not produce any direct output. Its effect is to update the specified UI element within your application.

Execution Flow

Real-Life Examples

  1. Pre-filling a tag field based on user preferences:

    • Scenario: A user is editing their profile, and you want to automatically populate a "Interests" field (a Chips Input Field) with their previously saved interests.
    • Inputs:
      • UI element: InterestsInputField (the Chips Input Field on the user profile form)
      • Answers: ["Reading", "Hiking", "Photography"] (retrieved from the user's database record)
    • Result: The InterestsInputField on the user's profile form will automatically display "Reading", "Hiking", and "Photography" as selected tags.
  2. Clearing a filter selection after a search is performed:

    • Scenario: After a user performs a search, you want to clear any previously selected category filters in a "Categories" field (a Chips Input Field) to prepare for a new search.
    • Inputs:
      • UI element: ProductCategoryFilter (the Chips Input Field used for filtering product categories)
      • Answers: [] (an empty list)
    • Result: The ProductCategoryFilter field will be cleared, removing all previously selected category chips, effectively resetting the filter.
  3. Updating skills based on a job role selection:

    • Scenario: On a job application form, when a user selects a specific "Job Role" from a dropdown, you want to automatically populate a "Required Skills" field (a Chips Input Field) with skills relevant to that role.
    • Inputs:
      • UI element: RequiredSkillsField (the Chips Input Field on the job application form)
      • Answers: ["Project Management", "Team Leadership", "Budgeting", "Stakeholder Communication"] (dynamically generated based on the user selecting "Project Manager" as the job role)
    • Result: When the user selects "Project Manager", the RequiredSkillsField will automatically populate with "Project Management", "Team Leadership", "Budgeting", and "Stakeholder Communication" as chips.