This function will return a sorted pipe-bar (|) delimited string that is numerically based on an existing pipe-bar (|) delimited string.
SppSortStringNumeric([String to Sort],[Include Non-Numeric])
Where:
String to Sort is a pipe-bar (|) delimited string.
Include Non-Numeric (Optional) is TRUE to include non-numeric characters, if included they will be placed after the numeric values.
Rule | Result | Meaning |
---|---|---|
SppSortStringNumeric("2|6|1|29|4|1") | 1|1|2|4|6|29 | This will return a sorted pipe-bar (|) delimited list with the given values numerically ascending. |
SppSortStringNumeric("2|6|1|29|4|1|H|R|A|D", TRUE) | 1|1|2|4|6|29|A|D|H|R | This will return a sorted pipe-bar (|) delimited list with the given values numerically and alphabetically ascending. |
SppSortStringNumeric("2|6|1|29|4|1|H|R|A|D", FALSE) | 1|1|2|4|6|29|A|D|H|R | This will return a sorted pipe-bar (|) delimited list with the given values numerically ascending and the non-numeric values ignored. |