Range Slider Interval
You can use the Range Slider Interval Pattern to allow users select a single value between two range values. This pattern enables the adjustment of content by predetermined intervals and within a chosen range. Moving the slider along the track, increases or decreases the value.
How to use the Range Slider Interval UI Pattern
In this example, we create a Range Slider Interval that allows the user select a price range between 1-50.
-
In Service Studio, in the Toolbox, search for
Range Slider Interval
.The Range Slider Interval widget is displayed.
-
From the Toolbox, drag the Range Slider Interval widget into the Main Content area of your application's screen, and on the Properties tab, enter the MinValue, MaxValue, InitialIntervalStart, and InitialIntervalEnd values. In this example, we add static values.
-
To create an OnChange event, on the Properties tab, from the Handler drop-down, select New Screen Action.
By default, the SelectedMinValue and SelectedMaxValue input parameter are created.
-
To create a variable for each of the expressions, right-click your screen name, select Add Local Variable, and on the Properties tab, enter a name and data type. In this example we create the LowerPrice and HighestPrice variables with the Currency data type.
-
So that the parameters read the range slider selections, double-click your screen action, from the Toolbox, add the Assign action to the screen action, and set the variable and value assignments for the Assign action.
-
To display your selection, go back to your screen, and from the Toolbox, drag the Container widget into the Main Content area of your application's screen, enter a name and add your content to the Container placeholder. In this example, we enter
DisplayValue
for the name and add some text and an expression for each of the input parameters. -
Go back to the screen action, and from the Toolbox, add the Ajax Refresh action to the screen action, and in the Select Widget pop-up, navigate to and select the Container widget name (in this example, DisplayValue), and click OK.
-
To bind the SelectedMinValue variable to the expression, double-click the expression widget, and in the Expression Value editor, select the variable you just have created, and click Done.
-
Repeat step 8 for the SelectedMaxValue input parameter.
-
From the Properties tab, you can change the Range Slider's look and feel by setting the (optional) properties.
After following these steps and publishing the module, you can test the pattern in your app.
Properties
Property | Description |
---|---|
MinValue (Decimal): Mandatory | Slider's minimum value. Examples
|
MaxValue (Decimal): Mandatory | Slider's maximum value. Examples
|
InitialIntervalStart | Start value selected by default when the page is rendered. Must be between min and max values. Examples
|
InitialIntervalEnd | End value selected by default when the page is rendered. Must be between min and max values. Examples
|
Step (Decimal): Optional | The slider moves in increments of steps. Examples
|
ShowPips (Boolean): Optional | If True, pips are shown below the slider. This is the default value. If False, no pips are shown. |
PipsStepNumber (Integer): Optional | Sets the number of Pip steps. This property is only applicable if the ShowPips property is set to True. |
IsVertical (Boolean): Optional | If True, the slider orientation is vertical. If False, the slider orientation is horizontal. |
VerticalHeight (Integer): Optional | If IsVertical is True, use this property to set the height (in px) of the slider. Examples
|
IsDisabled (Boolean): Optional | If True, the slider is disabled. If False, the slider is enabled. This is the default value. |
ExtendedClass (Text): Optional | Add custom style classes to the Range Slider Interval UI Pattern. You define your custom style classes in your application using CSS. Examples
|
AdvancedFormat (Text): Optional | Allows you to use more options than what is provided in the input parameters. For more information, see noUiSlider library. Example
|