subset_like

The members of a set or a list whose field matches a pattern: the whole value, without regard to case, with `*` as the only wildcard (`"*pan*"` finds "Fluffy Pancakes"). A cloud set is filtered on the server; a list where it is.

Runs on: either side: the compiler places the statement that calls it where the values it uses live.

Format:

subset_like(set_or_list, key, pattern)

Parameters:

Parameter Type Description
set_or_list mixed the cloud set, or the list of records
key string the field name
pattern string the pattern, with `*` as the wildcard

Returned Value:

Type Description
mixed the subset (a set) or the matching members (a list)

Examples

found = subset_like(items, "name", concat("*", search, "*"))