INSTANCES[X]

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

Use the INSTANCES[X] command to return the instance in the timeline based on start times.


FORMAT: INSTANCES[index]


DEFINITIONS:

  • index: a number less than or greater than 0. If index is greater than 0, then it will count from the beginning. (e.g., 1 represents the first instance in the timeline, 2 the second instance, etc.) If index is less than 0, it will count from the end. (e.g., -1 represents the instance with the latest start time, -2 the second latest start time, etc.)

EXAMPLE 1:

$time = length instance[2] where row = "POSSESSION"
show $time

Obtains the length of the second instance of the row "POSSESSION" in the timeline and uses it in the variable $time. Displays the result using the SHOW command.

EXAMPLE 2:

$time = length instance[-3] where row = "POSSESSION"
show $time

Obtains the length of the third last instance of the row "POSSESSION" in the timeline and uses it in the variable $time. Displays the result using the SHOW command.

For more control, use the LIMIT command.