When building an application, you often need to use a list of allowed values for a specific property. If the list of allowed values is short, mostly static, does not require localization, and common across inherited classes, the list of allowed values may be defined in a local list on the property record.
If the list of allowed values is large, expected to change frequently, requires localization, or requires customization at the class level, you can use a field value.
Field values provide an alternate method for defining allowed values for properties. Field values enable you to manage the list of allowed values separately from the property. Managing the allowed values separately from the property enables you to reuse a single property and customize the allowed values based on the context of the property. Field values also make it easier to localize words, phrases, and sentences that appear on Portal displays, reports, and user forms.
You can add different field values for a single property in the same context or in separate contexts using the Apply to class setting for each value. You can also use Rulesets to maintain different versions of each field value in each context.
For example, in a Pega Platform™ application, every Case instance has a status, which changes as the Case progresses through the Case Life Cycle. The status of a Case is set using the property named .pyStatusWork. The list of allowed values for .pyStatusWork is defined by using field values. .pyStatusWork uses a common set of standard values as defined in the Work- context. This common set of allowed values are available for all applications built on Pega Platform. The HRApps application built on Pega Platform can add custom status values, both for all Case Types in the application and for individual Case Types.
In the center of the following image, slide the vertical line to compare the custom field values for the Candidate and Onboarding Case Types in the HRApps application:
Check your knowledge with the following interaction: