SCORED function returns a new set containing the domain with a given ranking in an existing set.
In the example below domain labels are also shown, in brackets, to facilitate understanding.
For example, if the hidden results table is the one in the introduction, this snippet:
var workingSet = CLONE(ALL);
var silverMedal = SCORED(workingSet, 2);
will define and populate the
silverMedal set this way:
1.01 martial art
1.01 is in second place in the ranking.
Since the only domains with a score are those listed in the hidden results table, only a domain with a matching entry in that table can be returned.
The syntax is:
setis a set variable.
positionis an integer number that indicates the place in the ranking.
If the position does not exist, for example you specify the fifth position in a ranking of four elements, the function will return an empty set.