Unable to hide field.

Puneet4418
Tera Contributor

Hi,

we have 3 choice fields in a catalog item.

if we select value "X" in field 1, then field 2 should visible and if we select value "Y" in field 2, field 3 should visible. for this I have created a UI policy and its working fine.

Now, when I am changing the value of Field 1, Field 2 is not visible but Field 3 is still visible.

How can I fix this issue?

1 ACCEPTED SOLUTION

For example,
In the below example,
On selection of Country, display state, 
On selection  of state, display city.

NajmuddinMohd_0-1727677752195.png

 

Now, when I change the country, state field is removed but city if field not.

NajmuddinMohd_1-1727677797023.png



To overcome this, In the second UI Policy, add one more condition. Instead of On selection of State,
On selection of Country and State, city is visible.


Hope this helps.
Regards,
Najmuddin.


View solution in original post

5 REPLIES 5

Juhi Poddar
Kilo Patron

Hello @Puneet4418 ,

 

Considering three fields to be Country, State & City with following conditions

  1. If country is India then only state field will be visible
  2. If state is Maharashtra then only city field will be visible.

For this we need four Catalog UI Policies with Ui policy actions :

 

  1.  Country is India && state is not Maharashtra -> city visible false
  2. Country is India && state is Maharashtra -> city visible true
  3. Country is India -> state visible true
  4. Country is Not India -> state visible false, city visible false

Please note that for all the UI policies reverse if false field should be unchecked.

 

Please refer the attachment for better understanding.

Catalog Ui Policy: 

JuhiPoddar_1-1727691160189.png

 

Catalog Ui policy action:

JuhiPoddar_0-1727691041503.png

 

If my answer solves your issue, please mark it as Accepted  ‌JuhiPoddar_2-1727691291841.pngand Helpful‌ JuhiPoddar_3-1727691291842.png based on the impact.

 

Thank You

Juhi Poddar