UNIQUE

This tutorial is specific to our newest product, Hudl Sportscode. If you’re on Sportscode v11, use these resources instead or upgrade today.

The UNIQUE command will return instances from the given arguments that do not overlap for any part of the timeline. It is opposite of the OVERLAP command.


FORMAT: UNIQUE (label_name , label_name) or UNIQUE ($variable_name , $variable_name)


DEFINITIONS:

  • label_name: Quoted text specifying the label you wish to count in the front timeline or instances. (Can be grouped using OR, AND, NOT)
  • $variable name: A variable can store a letter or number or a selection of instances. It must absolutely start with the sign "$" and be followed by the name of the chosen variable. This name should be as short as possible to avoid errors, and should not contain spaces or start with a number.

EXAMPLE 1:

$var = unique ("Scrum" , "Tackle")
show $var

Obtains all the instances which have the label "Scrum" and do not overlap with any instances containing the label "Tackle" in them and use it in the variable $var. It will also get all instances which have "Tackle" in them and do not overlap with any instance containing "Scrum". Displays the video of the instances stored in the variable $var using the SHOW command. To show the video, you must use a toggle button (create video), available with an Elite or Elite Review license.

EXAMPLE 2:

$player = instances where row = "Gareth Edwards"
$action = instances where row = "SCRUM"
$display = unique ($player , $action)
show count $display and $action

Obtains all the instances of the row "Gareth Edwards" and uses it in the variable $player. Obtains the instances of the row "SCRUM" and uses it in the variable $action. With the UNIQUE command, obtain the instances of the variable $player which do not overlap with the instances of the variable $action (and vice versa) and use it in the variable $display. With the SHOW COUNT command, we display only the number of instances present both in $action and in $display.