Collection extensions
first
Returns: Collection Item Type
The FIRST function runs the inner function (which must return a boolean) over the collection and returns the first element from that collection that matches the criteria. If it doesn't find anything, it returns NULL, so you must protect against this by checking ISNULL or using IFNULL.
For example, if you had a CHARACTER COLLECTION and you ran .First(x, @x.Age > 35) it would either return the first character in the collection who was aged over 35 years old, or it would return null if nothing was found.
The FIRST function runs the inner function (which must return a boolean) over the collection and returns the first element from that collection that matches the criteria. If it doesn't find anything, it returns NULL, so you must protect against this by checking ISNULL or using IFNULL.
For example, if you had a CHARACTER COLLECTION and you ran .First(x, @x.Age > 35) it would either return the first character in the collection who was aged over 35 years old, or it would return null if nothing was found.