Constellation UI - Change Sections based on a Dropdown "On-Change" Event

Hi,

Can you please let me know whether we can change the UI look and feel based on a dropdown selection.

Scenario - I have list of countries and each section to be displayed is different from country to country. Hence, based on the country selection I need to differentiate the UI fields. Also this is inside a data object.

@SameeraS

Yes, this is possible. When you configure a view in App Studio you can set visibility conditions for fields, or embedded views. This can be either a Custom Condition (Client side evaluation) or a when rule (Server side evaluation). When there is a visibility condition defined in the view the UI will update based on the dropdown selection (assuming the condition uses the field from the dropdown). You do not need to configure any event on on the dropdown itself.

Configuring forms (pega.com)

Configuring dynamic field behavior (pega.com)

@SameeraS

Yes, this is possible with the help of visibility conditions on the fields (based on countries).

Thanks,

Ramesh

@Marc Alderman/ @RameshSangili

My use case is, when selected different different countries in “Pay-To Country” dropdown, the view is to be changed. (For each country, we have sub-classes and the entitled fields are added to a section in respective class level.) Also this functionality is running on a Landing Page.

I believe it is not a good practice to overload the view with embedded view as we have 140+ countries hence, 140+ views

@SameeraS

140+ views are not advisable for this use case and maintenance challenges . However, you can have a common views and try to add visibility conditions based on the country selection. For example: if you’re supposed to show the field Beneficiary IBAN for UK, Canada, USA then display if the Pay to Country is one of them by adding visibility conditions.