How to refresh Visiblity Condition of Dynamic Layout
Hi ,
I am new to Pega , so please excuse if its dumb question .( i am using pega 7.1)
I have got Two Dynamic Layouts
First Dynamic Layout got a Text Input Field , which accepts UserID .
and Second Layout has got Fields like First Name and Last Name .
The Second Layout is visible based on When Condition rule (If First Name and Last Name are not empty)
On Change of UserID , its calling a Activicty (REST - Connect) is called , then it sets values into First Name and Last Name values so second layout is visible)
The issue i am facing is that , when we manually clear the UserID Value , then the Second Layout is still visible .
Hi,
Based on what I see there is a lot to improve before solving this issue. First you should not use refresh section for this. Use post value only on the first field.
Then do not call an activity to get informatino from an API, there are datapages for that, datapage can directly reference a REST connector, it will improve performance are reusability of your call. Then instead of second dynamic layout use include section referencing datapage as context, so your components to display firstnam and lasname are in class of your result of the datapage, hence reusable also. You can then change refresh conditions of this include section to refresh whenever userid is changing. visibility condition should bet set on sub-section.