Ask AI
Skip to main content

Get value of input field

Function: Get value of input field

This function allows you to retrieve the current text or value entered by a user into an input field on your application's screen. Once retrieved, this value is stored in a variable, making it available for other actions or calculations within your application.

Input,

  • UI element: This is the specific input field on your screen from which you want to get the value. You must select an input field type for this to work correctly.

Output,

  • Answer: This is the name you give to the variable where the retrieved value from the input field will be stored. By default, it will be named INPUT_FIELD_ANSWER, but you can change it to something more descriptive like customerName or productQuantity. The value stored will be a piece of text (STRING).

Execution Flow,

Real-Life Examples,

  1. Capturing a Customer's Name

    • Inputs:
      • UI element: Customer Name Input Field (e.g., a text box where users type their name)
      • Answer variable name: customerName
    • Result: If a user types "Alice Smith" into the Customer Name Input Field, this action will store "Alice Smith" into a variable named customerName. This variable can then be used to personalize a greeting or save to a database.
  2. Retrieving an Order Quantity

    • Inputs:
      • UI element: Quantity Input Field (e.g., a number input where users specify how many items they want)
      • Answer variable name: orderQuantity
    • Result: If a user enters "5" into the Quantity Input Field, the action will save the value "5" into a variable called orderQuantity. This variable can then be used in a calculation to determine the total price of the order.
  3. Getting a Selected Date

    • Inputs:
      • UI element: Delivery Date Input Field (e.g., a date picker where users select a date)
      • Answer variable name: selectedDeliveryDate
    • Result: If a user selects "2023-12-25" from the Delivery Date Input Field, this date will be stored as text in a variable named selectedDeliveryDate. This variable can then be used to schedule a delivery or send a reminder.