Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Annotations

Updated on May 27, 2022

You use annotations in component metadata to perform specific operations, such as retrieving case information, running When rules, and retrieving environment information.

Supported annotations

The following table shows the annotations that Pega Platform supports:

Supported annotations in DX Component Builder

AnnotationAnnotation nameDescriptionExample
@ASSOCIATEDAssociated

Resolves the meta data of associated properties and returns the value to the client.

Typically used in the picklist component sub-type.

If used in a data page, the result is a part of the response.

{ 
datasource: “@ASSOCIATED .Genders” 
} 
@CASECaseReturns the ID of the current case.
{ 
caseId: “@CASE” 
} 
@DATASOURCEData source

Downloads the content in a data page to the client. The client then resolves the right records.

Combine this annotation with @P to denote the list of properties to resolve, as shown in the example.

{ 
"datasource": { 
       "source": "@DATASOURCE D_pyAnnouncements.pxResults", 
       "fields": { 
        "name": "@P .pyLabel" 
       } 
      } 
}
@EExpression

Evaluates an expression in the client and returns a Boolean value.

All associated property values are also downloaded to the client, to evaluate the expression at the client.

{ 
visible: “@E .Amount > 0” 
} 
@ENVEnvironment information

Resolves the environment information such as application name, application description, and access group.

{ 
  "title": "@ENV APPLICATION_DESC", 
} 
@FIELD_METAField meta dataReturns the specified field’s meta data as an object
{ 
  "fieldMetadata": "@FIELD_META .FirstName", 
}
@LLocalize stringTranslates a string into a target locale value. The annotated values become part of the locale bundle.
{ 
label: “@L Enter the first name” 
} 
@LRLocalization ruleReferences to a Rule-UI-Lozalizationrule.
{
"localeReference": "@LR OYH8EG-C11NAPP-WORK-USECASES!VIEW!CASEWIDELOCALACTIONS3",
}
@PPropertyDownloads the property information from the server and resolves the value from redux at the client.
{ 
Value: “@P .FirstName” 
} 
@ROUTING_INFORouting informationReturns the information about the container where the component is rendered.
{ 
  "containerInfo": "@ROUTING_INFO", 
} 
@USERUser dataReturns the user’s object name and ID.
{ 
  "loggedInAs": "@USER john", 
} 
@WWhen ruleExecutes a When rule on the server and downloads the result to the client. The client then reads the value and passes it to the component.
{ 
visible: “@W IsGreater” 
} 

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us