values(attribute)

Tinderbox Icon


Operator Type:   Function
Operator Scope of Action:   Document
Operator Purpose:   List creation

values(attribute)

New to v5.10.1, values() returns a Set of unique values for the attribute attribute. As the output is a of Set data type, the list of possible values is de-duped thus giving a list of unique values.

If the named attribute is a set or list, values() returns a list of all the unique discrete list item values that occur. If the named attribute is a string, values() returns all the unique strings.

The attribute parameter is evaluated so may be:

The scope of the assessment is always across the whole document. The data is returned in case-sensitive sort order (i.e. all capitals sort before lower case letters) so chaining .isort() may often be the desired 'default'.

values() differs from collect() in that values() returns Set-type data and collect() returns List-type data. The following are functionally equivalent in output:

$values($MyList) 

collect("all",$MyList).unique 


Possible relevant notes (via "Similar Notes" feature):

Up: Full Operator List
Previous: urlEncode(data)  Next: var 

A Tinderbox Reference File : Actions & Rules : Operators : Full Operator List : values(attribute)

Quicklinks: Attributes | Action Codes | Export Codes | Designators | Date Formats | aTbRef Site Map

[Last updated: 16 May 2012, using v5.11.1]


Search:

Google search aTbRef for:  


Creative Commons Licence

aTbRef by Mark Anderson is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.

[See aTbRef CC licence Attribution & Waiver info]

Made with Tinderbox