Tinderbox v9 Icon


Operator Type: 

Operator Scope of Action: 

Operator Purpose: 

Operator First Added: 

Operator Last Altered: 

Operator Has Optional Arguments: 

 Function  [other Function type actions]

 Item  [operators of similar scope]

 Data manipulation  [other Data manipulation operators]


 As at baseline

 [More on optional operator arguments]

Syntax note: Operators without any defined mandatory arguments may omit their empty closing parentheses



The basic form

$MyList = $MyList.isort(); 

The operator can be chained with other dot-operators:

$MyList = $MyList.isort().reverse(); 

This function re-sorts the referenced list's values in lexical, case-insensitive order. This means sorting letters in alphabetical order "a,b,c'" with all upper case instances sorting before any lower case ones as in "ant;Ant;bee;Bee;cow;Cow". Lexical sort of numbers means '1,11,2' not 1,2,11' as might be expected.

Alternative sorts are a lexical case-sensitive List.sort(), and a numeric List.nsort() (the latter giving '1,2,11' not '1,11,2'). Or, if using $Name or $Path data, use the optional long from (below) and let the nominated attribute's data type set the form of sort, e.g. for date sorting, sort on a Date-type attribute.

The resulting sort order can be reversed overall by chaining the List.isort() and List.reverse() functions.

This operator does not apply to Set-type lists because as from v9.0.0 Sets now auto-sort and cannot be (reliably) user-sorted to a different order.


Here the referenced list must be a list of note names or paths, i.e. list $Name data or $Path data (but not a mix of the two). If note names are not unique within the document, path values must be used to achieve correct sort. This form of sort cannot be used with any other sort of value list. This operator cannot be applied to any list of values, unlike the short form above.

In this form, the sort order can be based on the value of the stipulated AttributeRefStr (a $-prefixed attribute name). The attribute's value is derived from the item identified by the $Name or $Path of the list item being evaluated:

$MyList = $collect(children, $Name).isort($StartDate); 

$MyList = $collect_if(find($Prototype=="pArticle"), $Year!=,$Path).isort($Year); 

In this long form usage, the sort ordering is based on the data type of AttributeRefStr:

With .isort() lexical sorts are always case-insensitive.