Get Check box element by code
Function: Get Check box element by code
This function helps you find a specific checkbox component on your form using its unique identifier (code). Once found, you can use this checkbox element in other actions, for example, to check its current state or change its value.
Input
- Code (STRING): The unique identifier for the checkbox element you want to find on your form. This input is required.
Output
- Element (PART): The found checkbox element. This output will be stored in a variable you specify, allowing you to use it in subsequent actions. You must provide a name for this variable.
Execution Flow
Real-Life Examples
-
Retrieving a "Terms and Conditions" checkbox
- Inputs:
Code: "terms_agreement_checkbox"Element(variable name): "MyTermsCheckbox"
- Result: The checkbox element with the unique code "terms_agreement_checkbox" is found on the current form and stored in a variable named "MyTermsCheckbox". You can then use "MyTermsCheckbox" in a subsequent action to check if the user has agreed to the terms.
- Inputs:
-
Finding a checkbox based on a dynamic identifier
- Scenario: You have a list of products, and each product has a "Select" checkbox. You want to find the checkbox for a specific product whose code is stored in another variable.
- Inputs:
Code: (A variable namedselectedProductCodewhich holds the value "product_A_select")Element(variable name): "ProductSelectionCheckbox"
- Result: The checkbox element corresponding to the code "product_A_select" (retrieved from
selectedProductCode) is found and stored in a variable named "ProductSelectionCheckbox".
-
Checking if a user has opted-in to marketing communications
- Inputs:
Code: "marketing_opt_in"Element(variable name): "OptInCheckbox"
- Result: The checkbox element for "marketing_opt_in" is found and stored in a variable named "OptInCheckbox". You can then use this "OptInCheckbox" variable to check its current state (e.g., if it's checked or unchecked) to determine the user's preference for marketing communications.
- Inputs: