Ask AI
Skip to main content

Get value of chips input field

Function: Get value of chips input field

This function allows you to easily retrieve all the selections or entries made by a user in a "chips input field" on your application's screen. A chips input field is a special type of input where users can enter multiple distinct items, often displayed as "chips" or tags, like a list of skills, keywords, or email addresses. Once retrieved, these values are stored in a variable for you to use in other parts of your application's logic.

Input

  • UI element (PART): This is the specific "chips input field" on your application's page from which you want to get the values. You need to select the exact UI element that is configured as a 'chips-input-field' type.

Output

  • Answers (ARRAY of STRING): This is a list (or array) of all the individual text values that were entered or selected in the chosen chips input field. These values will be stored in a variable, which by default will be named CHIPS_INPUT_VALUE, but you can specify a different name if needed.

Execution Flow

Real-Life Examples

Here are some practical ways you can use the "Get value of chips input field" function:

Example 1: Capturing Product Tags for Filtering

Imagine you have an e-commerce application where users can add multiple tags to describe a product (e.g., "organic", "gluten-free", "vegan").

  • Inputs:
    • UI element: Select the "Product Tags" chips input field on your product creation form.
  • Result: The function retrieves all the tags entered by the user (e.g., ["organic", "gluten-free"]) and stores them in a variable named CHIPS_INPUT_VALUE. You can then use this variable to save these tags to your product database.

Example 2: Collecting User Skills for a Profile

Consider a professional networking application where users can list their skills using a chips input field.

  • Inputs:
    • UI element: Select the "Skills" chips input field on the user's profile editing page.
    • Answers (variable name): UserSkillsList
  • Result: The function gathers all the skills the user has entered (e.g., ["Project Management", "Data Analysis", "Public Speaking"]) and saves them into a variable called UserSkillsList. This list can then be displayed on their profile or used for matching with job opportunities.

Example 3: Building a Dynamic Email Distribution List

Suppose you have an internal tool where an administrator needs to send an announcement to a custom list of email addresses, which they type into a chips input field.

  • Inputs:
    • UI element: Select the "Recipient Emails" chips input field on the announcement creation page.
    • Answers (variable name): EmailRecipients
  • Result: The function extracts all the email addresses entered by the administrator (e.g., ["john.doe@example.com", "jane.smith@example.com", "team@example.com"]) and stores them in a variable named EmailRecipients. You can then use this EmailRecipients variable in an "Send Email" action to send the announcement to everyone on the list.