Set parameter of template ui element
Function: Set parameter of template ui element
This action allows you to dynamically change a specific setting (parameter) of a visual component (UI element) that is part of a reusable template in your application. This is incredibly useful for making your user interface interactive, responsive to user actions, or adaptable based on data, all without writing any code. For example, you can change the text on a button, update an image, or show/hide elements based on certain conditions.
Input
- UI element (PART): The specific visual component within your template whose setting you want to change. This could be a button, a text field, an image, a container, or any other element that is part of a template.
- Parameter name (STRING): The exact name of the setting or property you wish to adjust on the chosen UI element. For instance, if you want to change the text displayed on a button, the parameter name might be "Button Text". Other examples could be "Image Source URL", "Visibility", "Background Color", etc.
- Parameter value (STRING): The new value you want to assign to the specified parameter. This value will be applied to the UI element's setting. For example, if you're changing "Button Text", the value could be "Click Me!". If you're changing "Visibility", the value could be "true" or "false".
Output
This action does not produce a direct output value. Instead, its effect is a change in the application's user interface: the specified parameter of the chosen UI element is updated with the new value, which will be reflected on the screen.
Execution Flow
Real-Life Examples
Here are some practical ways you can use the "Set parameter of template ui element" action:
-
Changing Button Text After Submission: Imagine you have a "Submit" button on a form. After a user clicks it, you want to indicate that the form is being processed.
- Inputs:
- UI element: Your "Submit" button (e.g., named
SubmitButton). - Parameter name: "Button Text"
- Parameter value: "Processing..."
- UI element: Your "Submit" button (e.g., named
- Result: The text displayed on the
SubmitButtoninstantly changes from "Submit" to "Processing...", giving the user visual feedback.
- Inputs:
-
Updating an Image Based on User Selection: Suppose you have a product page where users can select different color options for an item, and you want the main product image to update accordingly.
- Inputs:
- UI element: The main product image component (e.g., named
ProductImage). - Parameter name: "Image Source URL"
- Parameter value: "https://yourwebsite.com/images/product_red_variant.jpg" (assuming the user selected the "Red" option).
- UI element: The main product image component (e.g., named
- Result: The
ProductImageon the page updates to display the image for the red variant of the product.
- Inputs:
-
Showing/Hiding a Loading Indicator: When your application fetches data from a database, you might want to show a "Loading..." message or spinner and then hide it once the data is ready.
- Inputs:
- UI element: A text label or spinner component (e.g., named
LoadingSpinner). - Parameter name: "Visible"
- Parameter value: "false" (after the data has finished loading).
- UI element: A text label or spinner component (e.g., named
- Result: The
LoadingSpinnercomponent disappears from the screen, indicating that the data is now available. (You would use a similar action withParameter value: "true"to make it appear when loading starts).
- Inputs: