Numeric Filters

You are here:

Numeric Filters

Numeric filters work with numbers to do some incredible things. For those that hate numbers you can convert them to pretty strings, for those that like them you can do all kinds of crazy math using them.

 

Abs

Show Details

Returns the absolute or unsigned value of any input that can be converted to a number.

 

AtLeast

Show Details

Limits a number to a minimum value.

 

AtMost

Show Details

Limits a number to a maximum value.

 

Ceiling

Show Details

Takes a number and returns the next largest integer.

 

DividedBy

Show Details

Divides a number by the number provided.

 

Floor

Show Details

Takes a number and returns the next smallest integer.

 

Format

Show Details

Formats the number based on a pattern you provide.

 

FormatAsCurrency

Show Details

Provides a simple way to display an internationalized currency amount. The filter uses the currency symbol defined in the 'OrganizationCurrencyCode' global attribute.

 

Minus

Show Details

Subtracts a number from the number provided.

 

Modulo

Show Details

The modulo filter returns the remainder of division of one number by another.

 

NumberToOrdinal

Show Details

Takes 1, 2 or 3 and returns 1st, 2nd or 3rd.

 

NumberToOrdinalWords

Show Details

Takes 1, 2 or 3 and returns first, second or third.

 

NumberToRomanNumerals

Show Details

For those Latin lovers, this filter takes a number and returns its Roman numeral equivalent.

 

NumberToWords

Show Details

Takes 1, 2 or 3 and returns one, two or three.

 

Plus

Show Details

Adds a number to the number provided.

 

RandomNumber

Show Details

Generates a random number between 0 and up to (but not including) the number you pass in as input.

 

Round

Show Details

Rounds a number to the nearest integer, or to a specified number of decimal places.

 

Times

Show Details

Multiplies a number by the number provided.

 

ToQuantity

Show Details

Many times you want to call Singularize and Pluralize to prefix a word with a number; e.g. "2 requests", "3 men". ToQuantity prefixes the provided word with the number and accordingly pluralizes or singularizes the word.

 

ToString

Show Details

Converts a number to a string.

Subscribe To Our Newsletter

Rock is a project of the Spark Development Network.