same field with two ui policies

vahini
Giga Guru

Hello all, 

 

Need help with one requirement

There is a list collector field called 'applicable_loss_type' , initially i was told to show this field only if

line of business = comm prop (or) personal prop (or) personal auto   ,

which is simple i wrote ui policy and said if LOB is one of these make applicable loss type Mandatory = True and Visible = True

vahini_3-1738779463164.png

 

 

 

Now got one more request from customer to make this list collector 'visible' and 'not mandatory'  if request type = modify threshold 

 

i wrote another ui policy if request type = Modify Threshold then 

applicable loss type Mandatory = False, Visible = True. 

 

vahini_2-1738779406556.png

 

 

 

 

 

But this 2nd policy is not working as expected, it's visible onload and when i change LOB and change request type applicable loss type is not hiding.

How to deal with this situation ? 

 

vahini_0-1738779250835.png

 

 

Thank you so much for reading my post and responding. 

 

6 REPLIES 6

JenniferRah
Mega Sage

Make one UI Policy like this: 

 

Condition: line of business contains commercial property OR

   line of business contains personal property OR

   line of business contains personal auto

Add another "OR" Clause and make that condition: 

request_type is Modify Threshold(s)

 

For that UI Policy, make the applicable_loss_type Visible = True.

 

Then create a second one like this:

Condition: line of business contains commercial property OR

   line of business contains personal property OR

   line of business contains personal auto

 

For that UI Policy, make the applicable_loss_type Mandatory = True. Do not set the Visible attribute.

 

Essentially, the principle is to only have one UI Policy for each field. But if you need it to work differently in different scenarios, break up the UI Policies based on the attribute (visible, mandatory, etc.).

Hi Jenni

 

I did exactly as you said , when i refreshed the form it worked as per UI policy but it's resetting when i change options like selected request type first applicable loss type visible

then selected line of business , it is now mandatory, then removed Line of business then it's not mandatory but visible

Now changed request type to None, but applicable loss type still stays. 

 

vahini_0-1738781479274.png

 

Do you have the "Reverse if False" checkbox checked on both UI Policies?

Yes it's checked on both policies