About Display Name Key and Plain Label till 18.1
Canvas provides each Form Item with its own label text, which can be either the Display Name Key (i.e. property driven label text) or plain label (i.e., direct text).
Display Name Key
The Display Name Key is a property driven locale enabled label text.This label text prefixed by 'LBL' keyword must be available in the property file that is mapped to a bundle key. You can find existing or map new bundle key with property file in a JS file.
Canvas fetches the label text using the following formula:
- If form level bundle key is not null:
LBL+ Display Name Key text in the property files of the FORM_DEFINITION.BUNDLE_KEY
- If form level bundle key is null or the label key is not found in the property file:
LBL + Display Name Key text in the property files of the FORM_ITEM_DEFINITION.BUNDLE_KEY
For example:
Consider a bundle key 'common' that is already mapped to property files common_en_US.properties, common_en_UK.properties, etc. To add label text "First Name" for the Display Name Key of ''FIRST_NAME", add 'LBL_FIRST_NAME = First Name' in common_en_UK.properties and common_en_US.properties files.
Plain Label
On the other hand, Plain Label is direct text, which is directly rendered without any translation irrespective of the end-user locale.
Canvas renders the Display Name Key and Plain Label properties based on the following conditions:
- If the display name key (bundle key) for the form item is not provided but the plain label is provided, then the plain label will get rendered in the application for the form item.
- If both the display name key and the plain label are provided for the form item, then the plain label will be taken as priority.
- If only the display name key is provided for a form item, then Canvas will check if the key is available in the property file at the item level and renders the value. If the key is not present at the item level, it will check whether the key is present at the form level and render the respective value for the form item.