Ask AI
Skip to main content

Get code from a Check box field

Function: Get code from a Check box field

This function helps you retrieve the unique identifier (code) associated with a specific Checkbox Field on your application's user interface. This code can be useful for various purposes, such as identifying which checkbox was selected, triggering specific logic, or storing preferences.

Input

  • UI element: The specific Checkbox Field from your application's user interface from which you want to get the unique code. This input is required.
    • Type: PART (specifically a checkbox-field)

Output

  • Result (CODE): This action provides a STRING value. This string represents the name of the variable in your application's "Variable scope" where the unique code of the selected Checkbox Field has been stored. You will use this variable name in subsequent steps to retrieve the actual checkbox code.
    • Type: STRING

Execution Flow

Real-Life Examples

Here are some examples of how you can use the "Get code from a Check box field" function:

Example 1: Identifying a Selected Product Option

Imagine you have a form where users can select different product options using checkbox fields. You want to get the unique identifier of the selected option to process it further.

  • Inputs:
    • UI element: Product_Option_A_Checkbox (a checkbox field on your product selection form)
  • Result: The action outputs a string, for example, "productCodeVar". This string is the name of a variable in your Variable Scope that now holds the unique code of Product_Option_A_Checkbox (e.g., "PROD-OPT-A-001"). You would then use "productCodeVar" in a later step to access "PROD-OPT-A-001".

Example 2: Tracking User Preferences

You have a user profile page with a checkbox field for "Receive Newsletter". You want to get its unique code to log the user's preference.

  • Inputs:
    • UI element: Receive_Newsletter_Checkbox (a checkbox field on the user profile page)
  • Result: The action outputs a string, for example, "newsletterPrefVar". This string is the name of a variable in your Variable Scope that now holds the unique code of Receive_Newsletter_Checkbox (e.g., "NEWSLETTER_OPT_IN"). You can then use "newsletterPrefVar" to check the status.

Example 3: Dynamic Form Behavior Based on Agreement

In a registration form, you have a "Agree to Terms and Conditions" checkbox. You need its unique code to enable or disable a "Submit" button based on whether the user has agreed.

  • Inputs:
    • UI element: Terms_And_Conditions_Checkbox (a checkbox field on the registration form)
  • Result: The action outputs a string, for example, "termsAgreementVar". This string is the name of a variable in your Variable Scope that now holds the unique code of Terms_And_Conditions_Checkbox (e.g., "AGREE_T_C"). You can then use "termsAgreementVar" in a condition to control the "Submit" button.