Edit

FieldLabel (fieldnametxt [, enumeration])

Result Type: String

Definition: Returns the label name of the specified table.fieldname, as redefined in the Fields section of the MoneyWorks Document Preferences (see Fields). If no label is found, the fieldname is returned.

If the field is an enumerated field with custom names (such as Transaction.PaymentMethod or Product.Colour, or Contacts.Role, then you may supply an enumeration value to get the custom enumeration name.

Examples:  FieldLabel("Product.Category1")

Would return “Style”, if the field label has been set to this in the Preferences, or “Category1” if it is not set.

FieldLabel("Name.Colour", 2)

Would return (in the default case) “Red”, the name of the second colour. If the colour name for the Name table has been customised then the custom name will be returned.

FieldLabel("Contacts.Role", 5)

Might return "Payables, CEO" (Note that role is a bitfield rather than an enumeration—5 is binary 101 indicating two roles).