Referring to a subset in a custom Event Action

I’m trying to refer to a subset in a custom event action, the subset has the same base object as the current record, so was expecting a true or false in the detective when referring to the subset:

var id = params.record_id;
var subset = mats.record(id).get(mats.ref(‘subset_ref’));
mats.log('In subset: ’ + subset);

Instead of ‘true’ or ‘false’, I get:

“Reference - field_path - SUB0005316BBFCE1 is not available
$params[“selects”] either does not exist or it is empty.”

Any ideas where I’m going wrong?
Many thanks,

If your reference is of type Subset then I think you just need to prefix the returned value with ‘:’ to make it a valid field path (which is what the ‘get’ method expects). Or change your reference to be type Field Path, and you can select the same subset in that.

Thanks Bob - I’ve changed it to a Field Path and it’s now working