Operator Scope of Action:
Operator First Added:
This returns a List of the unique values in the list, as a sorted but de-duped list. Hitherto, de-duping required passing data into a Set-type attribute and back. Trailing parentheses are optional for this property.
If $MyList is 'ant;bee;cow;bee':
$MyList = $MyList.unique;
$MyList = $MyList("Another note").unique;
$SomeList = collect(children, $MyNumberList).unique.nsort;
$MyList = collect(children, $MyList).unique.reverse;
The last above sets $MyList to a list of all the unique, discrete, values to be found in $MyList in every child of the current note. Use with collect() or collect_if() to act on a particular attribute across a group of notes. If a collect() with query scope is the designator 'all' the result will be every discrete value for the referenced list attribute across the whole document.
This operator does not apply to Set-type lists because Sets automatically de-duplicate items so are always a list of unique values.