I have a License Number field in a Constellation application. When the user enters a value, pyRefreshData runs and calls a data page to look up contractor information.
If no contractor is found, I tried the following approaches:
pxAddMessageToProperty()
pxAddMessageToPage()
Calling an Activity and using Obj-Validate
In Tracer, I can see that the validation runs and a message is created for the License Number property. However, the message is not displayed on the UI as a field-level validation error.
The message is visible in Tracer, but I cannot see it reflected on the page in a way that Constellation displays to the user.
Has anyone encountered this behavior?
Is there a supported way in Constellation to display an immediate validation error after pyRefreshData executes, without waiting for a submit/validation event?
We’ve tried on 25.1.2 and pxAddMessageToPage()works fine to display the error message based on the service response from FlowAction Submit. If you’re planning to achieve it without flow action submit, then I prefer to create a property “ErrorMessage” and with the help of Form Refresh settings that you can dynamically display the error messages or not.
Thanks for checking. In my case, the validation is occurring during pyRefreshData on an embedded page rather than during Flow Action Submit. I am currently using Pega Infinity 24.1.
I can see the property message being added successfully through pxAddMessageToProperty() in Tracer, which confirms that the logic is executing as expected. However, the message is not rendered on the Constellation UI immediately after the refresh.
Based on your suggestion, I created a dedicated ErrorMessage property and used Form Refresh to conditionally display the message. This approach works, but it displays the text as a regular message. My goal is to show it as a standard validation error with the usual red styling and behavior that users see with property-level validation errors.
I was hoping to understand whether this is expected behavior in Constellation 24.1. Specifically, are property messages added during pyRefreshData only visible in Tracer and not rendered on the UI until a subsequent validation or submit event? If anyone has been able to display property-level validation messages immediately after pyRefreshData, without relying on a Flow Action Submit, I would appreciate hearing how that was achieved.
i have implemented this approach in 25.1v. I believe you have saved pyRefreshdata DT to your work class and implement your logic.
If you can primary context we can see the error on screen, hope you did it by creating a property.
Can you create a text property and while configuring it use banner component and select warning then it may display as warning with read label (or) you need to configure the text with style you want in paragraph and set that value to a property and hide/display with a when condition.
This screen is configured as part of local action and they really don’t want it to be a multi form because this screen is inside a tab with multiple tabs. currently in 24.2 we can’t use banner’s for embedded page related messages. There are lot of other restrictions as well on embedded pages for which I created other posts and I also got in touch with Pega UI expert and LSA. Most of these concerns were addressed in 25.1x version and for now we are going with work arounds.