Fields – Numeric Range

A numeric range is used to create a variable range between two numbers that can be displayed in one of four ways; as an integer, a double, a currency, or as a range slider. A numeric range will use a Field Display field to determine how this range will be represented.

Either the start or the end of the numeric range may be a required field, defined by the Range Start Required and Range End Required fields. If both are required, the user will not be able to save or leave the page without filling in both a start and an end for the range.

This is how a numeric range will be displayed as a double, integer, or decimal field:

Numeric Range user control
A screenshot of a numeric range field, showing the blue label above a pair of empty fields set side by side, with a ‘-‘ character between them to show the beginning and end of the range

A Minimum Value and Maximum Value can be set for any range and will be mandatory if the range is being displayed as a slider. There are fields to indicate what the Small Stepper Value and Large Stepper Value should be to format the slider.

Here is how a slider numeric range will be displayed in the form:

Numeric Range slider user control
A screenshot of a numeric range slider in trellispark, showing the blue label above an incremented slider from 0 to 20.

Below is the form definition used to create a numeric range:

A screenshot of the creation process for a range numeric field in trellispark.

Decimal

Selecting “Decimal” as the numeric range type will create a pair of double fields that can each store a numeric value with one or more decimal places. The user can determine an appropriate number of Decimal Places to be filled in based on how specific their data should be.

As a backup, if a Decimal Places value other than zero is indicated for an integer, the fields will still display as a double and allow the user to save numbers with the appropriate decimal places.

Currency

Currency fields are used specifically to denote monetary values within the trellispark framework.

Like an integer, a currency will need to have a set of formats to control how it is displayed on the page before it is saved, and how it will appear in XSLT documentation. This can be used to change currency labels and whether or not smaller increments will appear. Currency amounts in the thousands or hundred thousands of dollars rarely need to display how many cents are involved.

These formatting choices can be controlled via regular expression (regex) or by using a mask.

Integer

Integers are another straightforward field, simply saving a number value to the Record XML.

Integers can have more specific formats than a regular string, with a display format to control how the value will appear on the page and a separate XSLT format to control how the value will be shown in XSLT documentation. Integers can also have a set maximum and minimum value to control the range of values that can be entered.

Range Slider

A range slider is a new type of field within the .NET 5 framework, displaying a range by moving a pair of markers to the correct positions on a slider. As with a slider field, the minimum and maximum values will become required fields to define the limits of the range slider. The large and small stepper fields will be used to create the markings along the length of the slider.

Updated on January 3, 2023

Was this article helpful?

Related Articles

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
Contact Support

Leave a Comment