Set text on text element
Function: Set text on text element
This action allows you to dynamically change the text displayed within any text-based element on your application's screen, such as labels, headings, or text within buttons. It's perfect for personalizing messages, displaying calculated results, or updating status information without needing to refresh the entire page.
Input
- Element (PART): The specific text box, label, heading, or other UI element on your screen whose text you want to modify. You must select an existing element from your application's layout.
- Value (STRING): The new words, numbers, or symbols you want to display in the selected text element. This can be a fixed piece of text or a value from another part of your application (like a user's name or a calculation result).
Output
This action does not produce any direct output. Instead, it immediately updates the text of the chosen element on your application's screen.
Execution Flow
Real-Life Examples
Here are some practical ways you can use the "Set text on text element" action in your application:
-
Personalizing a Welcome Message:
- Scenario: After a user logs in, you want to display a personalized welcome message on the dashboard.
- Inputs:
- Element: Select the "Welcome Message" label on your dashboard.
- Value: "Welcome, [User's Name]!" (where
[User's Name]is a variable holding the logged-in user's name).
- Result: The "Welcome Message" label on the dashboard immediately changes to display, for example, "Welcome, Alice!".
-
Displaying a Calculation Result:
- Scenario: You have a form where users enter numbers, and you want to show the total sum in a dedicated display field.
- Inputs:
- Element: Select the "Total Amount Display" text field.
- Value: "€125.50" (this value would typically come from a calculation action).
- Result: The "Total Amount Display" field updates to show "€125.50", reflecting the calculated sum.
-
Updating Button Text for User Feedback:
- Scenario: When a user clicks a "Submit" button, you want to change its text to "Submitting..." to indicate that the process is underway and prevent multiple clicks.
- Inputs:
- Element: Select the "Submit Button Label" (the text part of your submit button).
- Value: "Submitting..."
- Result: The text on the button instantly changes from "Submit" to "Submitting...", providing clear feedback to the user.