Discussion

Pegasystems Inc.
BR
Last activity: 28 Apr 2025 16:29 EDT
How to Retrieve the Pega Platform Version in Your Application
Introduction
When developing applications on the Pega Platform, you may need to access the platform version for various purposes such as compatibility checks, conditional functionality, or reporting. This tutorial explains how to programmatically retrieve the Pega Platform version and store it in a property for use within your application.
Problem Statement
You need to retrieve the Pega Platform version within your application, but standard methods only provide information about the application version rather than the underlying platform version.
Solution Overview
The solution involves creating a data transform that uses the pxGetBuildInfoString function to retrieve the platform version information and store it in a property for later use.
Step-by-Step Implementation
1. Create a Data Transform
First, create a data transform specifically for retrieving the platform version:
1. In Dev Studio, navigate to Create > Technical > Data Transform
2. Name the data transform ApplyPlatformVersion
3. Configure the data transform to set your target property with the platform version
2. Use the pxGetBuildInfoString Function
Within the data transform, use the pxGetBuildInfoString function to retrieve the platform version:
@pxGetBuildInfoString(false,false)
This function returns information about the Pega Platform build. The parameters (both set to false in this example) control the format and detail level of the returned information.
3. Call the Data Transform
To apply the platform version to your property, call the data transform from a flow action:
1. Add the data transform to a flow action's pre-processing section
2. This ensures the platform version is retrieved and stored before the action executes
Technical Details
About pxGetBuildInfoString Function
The pxGetBuildInfoString function is a built-in Pega function that returns information about the current platform build. The function accepts two boolean parameters:
- First parameter: Controls whether to include detailed information
- Second parameter: Controls the formatting of the returned string
When both parameters are set to false, as in our example, the function returns the core platform version information in a standard format.
Best Practices
- Store the platform version in a property that's accessible throughout your application
- Consider caching the version information to avoid unnecessary function calls
- Use the retrieved version information for compatibility checks or conditional processing
Conclusion
By following this tutorial, you can easily retrieve the Pega Platform version programmatically and use it within your application. This approach provides a direct method to obtain the platform version through the pxGetBuildInfoString function and store it in a property using a data transform.
References
1. https://docs.pega.com/bundle/platform-241/page/platform/app-dev/getting…
2. https://academy.pega.com/module/application-data-manipulation-dev-studi…
3. https://docs.pega.com/bundle/customer-service-241/page/customer-service…