Actually my requriment is in one section we have 4 fields and one button , once we click continue
If any field i didn't give and click continue here i handle one flow action run one activity ..property set message i used first only 2 input value that working , one button and one text field this field i used page-set- message .page error coming .
how to put error message on text field and button in activity
please let me know
***Edited by Moderator Marije to change type from Pega Academy to Product***
It's not clear to me what problem you are trying to solve.
What is the reasoning for using an activity for validation? That is not a best practice.
For validation it is a best practice to use the Validation Rules and reference them on the Flow Action which you are using to display the form. I'm assuming you are using a Flow Action for a case assignment here.
For "Required" validations you can mark properties as required on the control config in the section, this will ensure it runs client side and does not require submitting data to the server to run the validation. If you try to submit it will give the error on the property itself and show a popup to indicate that there are errors:
For other validations you can define criteria in a validation rule (done here in case designer). This will submit data to the server on click of submit and the validation runs in the backend. If it fails then the error messages will be applied to the whole page and the specific properties:
Posted: 5 months ago
Posted: 10 Aug 2022 13:36 EDT
Wolfgang Radl (mrwolf)
Senior Solutions Consultant
@keerthiy there are several ways to perform data validation in Pega. You want to make sure your logic is not tied to the section (the view) itself. Imagine someone creating or updating a case with the DX API, providing invalid input - you would need to make sure this is rejected as well. In other words, don't use activities and buttons with OnClick events, but one of these methods first: https://academy.pega.com/topic/data-validation/v3