Ask AI
Skip to main content

Get value of slider field

Function: Get value of slider field

Description,

This action allows you to retrieve the current value that a user has selected on a "Slider Field" UI element in your application. Once retrieved, this value is stored in a variable, making it available for use in subsequent steps of your workflow.

Input,

  • UI element (Type: PART, Subtype: slider-field, Required): This is the specific "Slider Field" component from your application whose value you want to get. You must select a UI element that is specifically a "slider-field" type.

Output,

  • Answer (Type: STRING, Default Variable Name: SLIDER_FIELD_ANSWER): This is the actual value currently set on the selected Slider Field. This value will be stored in a variable. By default, this variable will be named SLIDER_FIELD_ANSWER, but you can choose a different name to suit your needs. The value itself will be a piece of text.

Execution Flow,

Real-Life Examples,

Here are some practical ways you can use the "Get value of slider field" action:

  1. Calculate a Discount Based on User Input

    • Scenario: You have an e-commerce application where users can select a discount percentage using a slider. After they make their selection, you want to calculate the final price.
    • Inputs:
      • UI element: Discount_Slider (a slider field UI element)
      • Answer (variable name): SelectedDiscountPercentage
    • Result: The value from the Discount_Slider (e.g., "15" for 15%) is stored in a new variable called SelectedDiscountPercentage. You can then use this variable in a "Calculate" action to apply the discount to a product price.
  2. Adjust Notification Frequency

    • Scenario: In a user settings page, you have a slider that allows users to choose how often they receive notifications (e.g., "Daily", "Weekly", "Monthly"). You want to save this preference.
    • Inputs:
      • UI element: Notification_Frequency_Slider (a slider field UI element)
      • Answer (variable name): UserNotificationPreference
    • Result: The selected notification frequency (e.g., "Weekly") from the Notification_Frequency_Slider is stored in the UserNotificationPreference variable. This variable can then be used to update the user's profile in your database.
  3. Control a Dashboard Widget's Data Range

    • Scenario: You have a dashboard with a chart showing sales data. A slider allows users to select a time range (e.g., "Last 7 Days", "Last 30 Days", "Last Year"). You want to update the chart based on this selection.
    • Inputs:
      • UI element: Sales_Time_Range_Slider (a slider field UI element)
      • Answer (variable name): DashboardTimeRange
    • Result: The chosen time range (e.g., "Last 30 Days") from the Sales_Time_Range_Slider is stored in the DashboardTimeRange variable. This variable can then be passed to a "Load Data" action to fetch and display the relevant sales figures on the chart.