GetSortValue()
A GetSortValue() function converts a specified value from a numeration mechanism to a decimal number that allows sorting, e.g., 1 -> 1, 1a -> 1.01, 1b -> 1.02, 2 -> 2, 2a -> 2.01 …
Syntax
GetSortValue(value);
Function arguments
- value – (String) the value to be converted to a decimal.
Return value
This function returns a Decimal.
The GetSortValue() function returns the value converted to a decimal type. If the conversion is not possible, an error is thrown.
Examples
Example 1
This will convert the text value '1′ to 1.
numVal = GetSortValue("1");
Example 2
This will convert the text value '1a’ to 1.01.
numVal = GetSortValue("1a");