A new array function has been added to the automation rules. The detect function returns the first item in an array that matches the condition. It is similar to the select function, when that is used to retrieve the first record of the collection. As an example, the following two expressions retrieve the same task record:
tasks.select(status = registered)[first]
tasks.detect(status = registered)
detect function over the
select function where possible will make expressions shorter and easier to read.