Parameters
NameTypeDescription
recordsys.data.RecordThe record the field belongs to.
nestedsys.data.Record

This is a sys.data.Record object with the difference that the root of the record is set to the nested fields. For example let’s suppose you have the following structure:

  • name
  • email
  • addresses
    • addressLine
    • zipCode
    • state

Field addresses is multi-valued and you want the label to be the state. You cannot use the record variable because you don’t know which is the address you are generating the label for. The solution is to use the nested variable which already points to the address you are calculating the label. Something like this:

return nested.field('state').name();
Returns
string - You should return the label.
Samples
 
//uses the state and zip code as the label
return nested.field('state').val()+' - '+nested.field('zipCode').val();