Detect Function Added to Automation Rules


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: = registered)[first]

tasks.detect(status = registered)

Using the detect function over the select function where possible will make expressions shorter and easier to read.