NumToSortableText ( value ; decimals )
returns a textual representation of a number for sort purposes
Average rating: 4.7 (30 votes) Log in to vote
Theo Ros - Show more from this author |
NumToSortableText ( -1234 ; 2 )
09999999999998765.99
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
Returns a sortable textual representation of a numeric value.
To text-sort numbers, you will have to pad them with zeros.
To be able to cope with negative values, subfunction FlipDigits()
is used, to convert these into text, that when padded with nines
will turn the smallest value into the largest one.
Finally, positive values will be preceded by a "9", while negative
values will be prefixed wit a "0".
This will result in textvalues that will sort correctly, for instance
in a portal-sort solution.
Syntax: NumToSortableText ( value ; decimals )
Return type: Text
Uses function FlipDigits() defined earlier.
Comments
Jason Mark, Northampton MA May 10, 2013 |
||
Thanks! | ||
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.