Get value of slider field
Function: Get value of slider field
This action allows you to retrieve the numerical value currently selected on a "slider" component within your application's user interface. Once retrieved, this value is stored in a variable, making it available for use in other parts of your application, such as calculations, conditional logic, or displaying to the user.
Input
- UI element (Required): This is the specific slider component on your form or page from which you want to get the selected value. You must select a UI element that is specifically a "slider field."
Output
- Answer Variable Name (Text): This action returns the name of the variable where the slider's selected numerical value has been stored. By default, this variable is named
SLIDER_FIELD_ANSWER. You can use this variable name in subsequent actions to access the numerical value chosen by the user on the slider.
Execution Flow
Real-Life Examples
Here are some practical ways you can use the "Get value of slider field" action in your applications:
Example 1: Capturing Customer Satisfaction
Imagine you have a customer feedback form with a slider asking users to rate their satisfaction from 1 to 10.
- Inputs:
- UI element: Select your "Satisfaction Rating Slider" component.
- Answer Variable Name:
CustomerSatisfactionScore
- Result: The action successfully retrieves the numerical value from the "Satisfaction Rating Slider." A new variable named
CustomerSatisfactionScoreis created (or updated) in your application's memory, holding the number selected by the user (e.g.,8). The action's output is the textCustomerSatisfactionScore. You can then use thisCustomerSatisfactionScorevariable to save the rating to your database or trigger follow-up actions based on the score.
Example 2: Setting a Budget Allocation
You're building an internal tool where managers can allocate a budget percentage for different departments using a slider.
- Inputs:
- UI element: Select the "Marketing Budget Slider" component.
- Answer Variable Name:
MarketingBudgetPercentage
- Result: The action retrieves the percentage value from the "Marketing Budget Slider." A variable named
MarketingBudgetPercentageis created, containing the chosen number (e.g.,35). The action's output is the textMarketingBudgetPercentage. ThisMarketingBudgetPercentagevariable can then be used in calculations to determine the actual budget amount or to update a budget report.
Example 3: Adjusting Product Quantity in a Cart
In an e-commerce application, a user might use a slider to quickly adjust the quantity of an item in their shopping cart.
- Inputs:
- UI element: Select the "Product Quantity Slider" component for a specific item.
- Answer Variable Name:
SelectedProductQuantity
- Result: The action gets the number of items chosen from the "Product Quantity Slider." A variable named
SelectedProductQuantityis created, holding the user's chosen quantity (e.g.,3). The action's output is the textSelectedProductQuantity. ThisSelectedProductQuantityvariable can then be used to update the total price in the shopping cart or to check inventory levels.