Set values of Check box field
Function: Set values of Check box field
This action allows you to control which options are selected within a specific Checkbox UI element on your application's forms. You can use it to pre-select certain choices, update selections based on user input, or clear all selections.
Input,
- UI element (Type: PART, Subtype: checkbox-field, Required): This is the specific Checkbox UI element on your form that you want to modify. You need to point to the exact checkbox field you intend to work with.
- Answers (Type: ARRAY): This is a list of the exact choices you want to be selected in the chosen Checkbox UI element. If you provide an empty list, all current selections in the checkbox field will be cleared. If you provide choices that are not available in the checkbox field, an error will occur.
Output,
No direct output. This action updates the selected checkbox field internally, making the chosen answers available for subsequent actions or display on your form.
Execution Flow,
Real-Life Examples,
-
Selecting multiple options for a survey question:
- Inputs:
UI element: "Preferred Communication Channels" (a checkbox field with options: "Email", "SMS", "Phone Call")Answers: ["Email", "SMS"]
- Result: The "Email" and "SMS" options are selected in the "Preferred Communication Channels" checkbox field.
- Inputs:
-
Clearing all selections in a filter:
- Inputs:
UI element: "Subscription Preferences" (a checkbox field with options: "Newsletter", "Promotions", "Product Updates")Answers: [] (an empty list)
- Result: All previously selected options in the "Subscription Preferences" checkbox field are deselected, effectively clearing the filter.
- Inputs:
-
Attempting to select an invalid option:
- Inputs:
UI element: "Available Features" (a checkbox field with options: "Reporting", "Analytics", "Export")Answers: ["Reporting", "Advanced AI"]
- Result: An error occurs because "Advanced AI" is not a valid choice available in the "Available Features" checkbox field. The action will stop, and the "Reporting" option will not be selected.
- Inputs: