Ask AI
Skip to main content

Get label of radiobutton field

Function: Get label of radiobutton field

This function helps you retrieve the text label of the option that a user has selected in a "Radio Button Field" UI element. Once retrieved, this label (which is a piece of text) can be stored in a variable within your application for further use, such as displaying it, using it in calculations, or saving it to a database.

Input

  • UI element (PART)
    • Description: This is the specific "Radio Button Field" component on your application's screen from which you want to get the selected answer's label.
    • Type: UI Element (specifically, a 'radiobutton-field' type)
    • Required: Yes

Output

  • Answer label (STRING)
    • Description: This output provides the actual text label of the option that was selected in the chosen Radio Button Field. This label is then stored in a variable within your application's data. By default, this variable will be named RADIOBUTTON_FIELD_ANSWER_LABEL.
    • Type: Text (STRING)

Execution Flow

Real-Life Examples

  1. Capturing a Customer's Preferred Contact Method

    • Scenario: You have a form where customers select their preferred contact method (e.g., "Email", "Phone", "SMS") using a Radio Button Field. You want to store this preference as text.
    • Inputs:
      • UI element: Select the "Preferred Contact Method" Radio Button Field from your form.
    • Result: If the customer selected "Email", the function will output "Email". This "Email" text will then be stored in a variable (e.g., named RADIOBUTTON_FIELD_ANSWER_LABEL or a custom name you set), which you can then use to send a confirmation email.
  2. Recording a Survey Response for Product Satisfaction

    • Scenario: In a customer satisfaction survey, users rate a product using a Radio Button Field with options like "Very Satisfied", "Satisfied", "Neutral", "Dissatisfied", "Very Dissatisfied". You need to capture the exact text of their rating.
    • Inputs:
      • UI element: Select the "Product Satisfaction Rating" Radio Button Field.
    • Result: If a user selected "Very Satisfied", the function will output "Very Satisfied". This text will be stored in a variable, allowing you to analyze the textual feedback.
  3. Determining a User's Chosen Subscription Plan

    • Scenario: Your application allows users to choose a subscription plan (e.g., "Basic", "Pro", "Premium") via a Radio Button Field. After selection, you need the plan's name to update their account.
    • Inputs:
      • UI element: Select the "Subscription Plan Selection" Radio Button Field.
    • Result: If the user selected "Premium", the function will output "Premium". This "Premium" text will be stored in a variable, which can then be used to update the user's subscription status in your database.