Ask AI
Skip to main content

Get value of text field

Function: Get value of text field

This action helps you retrieve the information that a user has typed into a specific text input field on your application's screen. Once retrieved, this information is saved into a variable, making it available for other actions or parts of your application to use.

Input,

  • UI element: This is the specific text input field on your application's screen from which you want to get the value. You must select a UI element that is a "text field" type.

Output,

  • Answer: This is the name of the variable where the retrieved text field value will be stored. If you don't provide a name, it will automatically be named "TEXT_FIELD_ANSWER". The value stored in this variable will be a piece of text (STRING).

Execution Flow,

Real-Life Examples,

Example 1: Capturing a User's Name

Imagine you have a form where users enter their name. You want to greet them by name on the next screen.

  • Inputs:
    • UI element: Select the text field labeled "Your Name".
    • Answer: "CustomerName"
  • Result: The text entered by the user in the "Your Name" field (e.g., "Alice") is stored in a variable called CustomerName. You can then use CustomerName in a greeting message like "Hello, Alice!".

Example 2: Storing a Product Quantity

You have an order form where customers specify the quantity of an item they wish to purchase. You need this number for calculation.

  • Inputs:
    • UI element: Select the text field labeled "Quantity".
    • Answer: "ProductQuantity"
  • Result: The number entered by the user in the "Quantity" field (e.g., "5") is stored as text in a variable called ProductQuantity. This variable can then be used in a calculation action to determine the total price.

Example 3: Retrieving a Comment for Review

In a feedback form, users can leave comments. You want to save these comments to a database for later review.

  • Inputs:
    • UI element: Select the multi-line text field labeled "Your Comments".
    • Answer: (Left blank, so it defaults to "TEXT_FIELD_ANSWER")
  • Result: The comment typed by the user (e.g., "The service was excellent!") is stored in a variable named TEXT_FIELD_ANSWER. This variable can then be passed to another action that saves the comment to your database.