Set Choice field to None through UI policy if my condition fails

farci
Mega Expert

Hi Team,

I am unable to set a choice field as None when my condition fails. Below are the screenshots

find_real_file.png

Inline image 1

Inline image 2

Execute if true

function onCondition() {

  if(g_form.getValue('legends') == 'Between Expected & Minimum Target')

  g_form.setValue('d_type','Expected Default');

  if(g_form.getValue('legends') == 'Less than Minimum Target')

        g_form.setValue('d_type','Minimum Default');

  }

Execute if false

function onCondition() {

  g_form.clearValue('d_type');

  }

-------------------------------------------------------------------------------------------------------------------

In execute if False,

I tried all options to set this value as '--None--'

but it did not worked.

In my legends

Thank You for your support and help.

Regards,

Narmi

1 ACCEPTED SOLUTION

Kalaiarasan Pus
Giga Sage

Instead of 'or' in the condition, add 'And' instead.


View solution in original post

5 REPLIES 5

Hi Kalaiarasan,



Just adding And condition worked for me.



Thank You everyone for responding.



Regards,


Narmi