MobileGlideForm (g_form) - getLabel(String fieldName)

Gets the form label text.

Table 1. Parameters
Name Type Description
fieldName String The field name.
Table 2. Returns
TypeDescription
StringThe label text.

if (g_user.hasRole('itil')) {
      var oldLabel = g_form.getLabel('comments');
      g_form.setLabel('comments', oldLabel + ' (Customer visible)');
      }