Can we hide a section/button based on a property validation
I have two text input properties(Lest take P1, P2) in section(Main section). And i have two embedded sections(Eg.: S1,S2) on the main section. Here, if some invalid data(a set of conditions) entered to the Text input P1, i need to hide S1. And similarly if P2 has some error messages i need to hide S2.
We can achieve this by writing all the set of error conditions in a when rule. But do we have any Pega ootb like we hasmessages for page level message validation or any other way to achieve section hide based on property level message.
***Edited by Moderator Marissa to update platform capability tags****
If you are looking for a function to check the property has a message like hasMessages function which check the existence of messages on Page, then you can try with hasMessagesProperty function. If you can't find this function in your version then try to write a sample function which takes 2 input parameters i.e. myActivity(Java type - Activity) & myPropertyReference(Java type - String) with below java code,