How to set a property value when a custom Landing Page loads in Pega Constellation

I am working on Pega Constellation 25.1.2.

I have created a custom Supervisor Landing Page in the portal. When the user clicks on this landing page, I need to set a specific property so that it can be used across the widgets on that page and in subsequent actions.

I tried the traditional approach by configuring a Harness on the landing page and setting an Initialization Activity that calls a Data Transform to set the required property. However, when I traced it, the initialization activity is not executing at all when the landing page is launched.

Is there a proper way to run some logic or set properties when a Constellation Landing Page loads?

Specifically, I would like to know:

  1. What is the recommended approach in Constellation to initialize values on landing page load?

Any guidance or working examples would be really helpful.

Thanks in advance!

Hi @KomuthuF17600304

In Pega Constellation, the architecture has changed and the UI processing no longer relies on traditional Harness rules. Because of this, changes or initialization activities configured on a Harness will not execute or reflect at runtime.

Recommended Approach

To initialize values when a landing page loads, you should handle the logic using a Data Transform:

  1. Locate the Class: Open or create the pyDefault Data Transform in your application’s UI pages class (the class context where your Constellation landing pages are defined).

  2. Global Execution: Note that this Data Transform will execute every time any landing page is launched.

  3. Target Your Specific Page: To restrict your initialization logic so it only runs for your specific Supervisor Landing Page, use the dynamically passed parameter pageID to create a precondition or conditional block (e.g., Param.pageID == "YourLandingPageID").

This ensures your properties are set correctly upon page load and remain available for your widgets and subsequent actions.

Hi @VVNagaSaiN ,

Thank you for the detailed response and the recommended approach. I really appreciate it!

I followed your suggestion and created a pyDefault Data Transform in my UI Pages class. I can see that the Data Transform is executing when I launch the landing page (confirmed via Tracer).

However, I have two issues:

  1. Where can I find the pageID property? Is there a specific place where I can see the pageID of a particular landing page?

  2. Property not appearing after setting I created a new property in the UI Pages class and tried to set its value inside the pyDefault Data Transform without the condition just wanted to see if the value getting set. The step is executing in the tracer, but when I click on the step, I don’t see my newly set property in the page. Only pageID, pageClass, and a few other OOTB properties are visible.

Could you please guide me on how to correctly view the pageID and why the property I set is not visible?

Thanks in advance!

Hi @KomuthuF17600304 ,

pageID is a parameter, to find your landing page’s pageID, just turn on the tracer before clicking the landing page, and in the tracer find the call like below:

**Resource: /application/v2/pages/LandingPage
**
In this request, you will find that your pyDefault data transform is being executed. Click on any step and open parameter page. You will find the pageID corresponding to your page.

And for missing properties, I suspect you are looking at parameter page instead of the page on which the data transform is being executed. The data transform will be executed on page named pyPortal like in the screenshot present in above reply. It that pyPortal page, the properties will be set.

Hi @VVNagaSaiN

Thank you so much for your detailed guidance!

I followed your suggestion and it worked perfectly. I’m now able to successfully set the required property when my Supervisor Landing Page loads.

Really appreciate your help!

Thanks for sharing the solution. Would you be able to write short article describing it? Would love to have it as part of Constellation 101

I’d love to do that. Will write it soon.