Hi Randy,
I’ve got a couple of suggestions to try!
var leg_type = mats.record(leg_recid).get('OCC_Ref_Fld_leg_type');
This removes the square brackets as you aren’t passing in an array and that may be causing a problem.
Or…
mats.record(leg_recid).get(mats.ref('OCC_Ref_Fld_leg_type'));
This is using the ref function to return the field path.
Richard