Label

The label component is used to display property values in a label. A label can take in exactly one property (if it is a nested property, then up to 3 levels). Sequence determines the order in which the labels appear.

{
  "labels": [{
    "sequence": 1,
    "properties": [

    ],
    "defaultColor":
    "displayLabel":
    "values": [
      {  "value":
         "color":
         "displayLabel":
      },
      ...
    ]
  }]
}

Assign color

A color can be specified for every property value. For enums, the value is the domain code (Note - In the UI the domain boilerplate value is displayed). In case of a boolean, it takes true and false as value. For string, number and date fields, the field value must be specified.

The following colors are available:

  • red

  • orchid

  • blue

  • blue-2

  • cyan

  • cyan-2

  • cyan-3

  • green-2

  • green

  • grey

"labels":[{
  "sequence":1,
  "properties":[
    {  "name":"status"
    }
  ],
  "values":[
   {  "value":"INITIAL",
      "color":"grey"
   },
   {
     "value": CHANGE",
      "color":"blue"
   },
    ..
  ]
}]

Conditionally display label

If a field has a value that is not configured, the label will either display the defaultColor or the label will not be displayed at all. Note that a label is never displayed when the value of the property is null. This implies that the display settings 'Always' and 'notNull' give the same results in case of labels.

"labels":[{
  "sequence":1,
  "properties":[
    {"name":"status"
      ...
    }
  ],
  "defaultColor":"grey"
  "values":[
    { "value":"FINALIZED",
      "color":"green"
    },
    { "value": "CHANGE",
      "color":"blue"
    },
    ..
  ]
}]

Array Property and Label

The user can also specify a property of the list (array/subResource), in this case the label is shown for each value in the list. Consider the following example to clarify:

"labels":[{
  "sequence":1,
  "properties":[
    { "name":"claimPendReasonList",
      "properties": [
        { "name":"pendReason",
          "sequence": 1,
          "properties": [
            { "name":"code",
              "sequence": 1
            }
          ]
        }
      ]
    }
  ],
  "defaultColor":"blue"
}]

This will display a blue label with the pend reason code as value for each pend reason on the claim.

Custom Label Value

It is possible to display custom labels by specifying the 'displayLabel' property referring to the boilerplate text key. The boilerplate text of that key is then displayed as the label.

"labels":[{
  "sequence":1,
  "properties":[
   ...
  ],
  "defaultColor":"grey",
  "displayLabel":"",//boilerplate key
  "values":[
    { "value":"Y",
      "color":"blue",
      "displayLabel":""//boilerplate key
    }..
  ]
}]

Example

Label 'Obsolete' in red when a message is marked as obsolete.
"labels":[{
  "sequence":1,
  "properties":[
    { "name":"obsolete",
      "sequence":1
    }
  ],
  "values":[
    { "values":"true",
      "color":"red",
      "displayLabel":"CUSTOM_FN002_LABEL_OBSOLETE" //boilerplatekey
    }..
  ]
}]

The label component for displaying the message severity for object 'messages' in search message page.

"labels": [{
  "sequence":1,
  "properties": [
    { "name":"severity",
      "sequence": 1,
    }
  ],
  "defaultColor":"blue",
  "values":[
    {"value":"F",
      "color":"red"
    }
  ]
}]

…​