Page tree
Skip to end of metadata
Go to start of metadata

Function: Unmatched




Unmatched is a special function which returns true if the value has not matched any of the previous facets, it does not accept any arguments.

To illustrate - if there were 3 requirements, each with different priorities:

  • Requirement A - Priority: High
  • Requirement B - Priority: Low
  • Requirement C - Priority: Medium

We could write a faceted aggregation expression:

Faceted Equal(Priority, High) AS 'Urgent',
        OrArgs(Equal(Priority, Low), Equal(Priority, Medium)) AS 'Non-Urgent'
WHERE EntityType = Requirement

But if we add more non-high priorities to the picklist over time, we will need to update our faceted query to then capture those values.

As an alternative we could just write this:

Faceted Equal(Priority,High) as 'Urgent',
        Unmatched() as 'Non-Urgent'
WHERE EntityType = Requirement

In this case, anything that doesn't match urgent will be "unmatched" and fall through to the "Unmatched()" facet.

  • No labels