Length of a Linked Record Array

Hello everyone,

The LEN expression does not work for arrays stored in a linked records column, so I had to get really creative this morning.

Sharing this expression for posterity, but curious if anyone else has found a better way? I am sure mine could be cleaner but is this sort of approach the only way?

Furthermore, this should be considered for fixing since the LEN function works for regular arrays.

if(contains(totext(@LINKED ARRAY), '[]'), 0,
    if(contains(totext(@LINKED ARRAY), '","'),
        len(split(totext(@LINKED ARRAY), '",'))
, 1))