Skip to content

SCORED

The 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

because domain 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:

SCORED(set, position)

where:

  • set is a set variable.
  • position is an integer number that indicates the place in the ranking.

Note

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.