Pega Infinity ā26 provides OOTB support for configuring badge variants dynamically in Constellation applications.
Demo : https://youtu.be/J3B9uxmXX2Q
Badge variants help visually distinguish different values in the UI. They can be particularly useful with case statuses, where different states may need different visual representations to help users quickly understand the current state of a case.
Badge configuration
When a field is displayed as a Badge, the Badge variant selection provides two options:
- Constant ā applies a fixed badge variant.
- Property reference ā determines the badge variant dynamically using another property.
With a property reference, the source property can provide variants such as info, warn, success, or urgent based on application logic.
Example: Configuring the Work Status Field
For this example, we display the Work status field as a Badge.
We use WorkStatusDisplayStyle property as the Badge variant source. This property provides the appropriate variant based on the current Work status.
Mapping the Badge Variants
The WorkStatusDisplayStyle property uses a Declare Expression, sourced by a Decision Table, to determine the variant based on the current case status. The returned variant displays the Work status badge in the corresponding color.
Pending-AdditionalInfo ā warn ā Orange
Target-Approved ā success ā Green
Target-Rejected ā urgent ā Red
Any other status ā info ā Grey
Custom badge variant mapping offers greater flexibility in how values are visually represented in Constellation. With Pega Infinity ā26, this can be configured OOTB without the need for a custom DX component, making it easier to create clear and meaningful visual experiences.





