when we select none form the dropdown then it should be empty

surya65
Tera Contributor

Hi,

i'm using datalook concept for below field calculation,

ex: when i  select dropdown has   1 in the problem Impack, and 

     when i select dropdown  2  in the Likelyhood  i get a score has  

2 in Risk Score. has show below .

find_real_file.png

when i select " none" the fields on the form remains same, how to set empt when we select none.

find_real_file.png

1 ACCEPTED SOLUTION

Try this

function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading) {
var Likelyhood=g_form.getValue('u_likelyhood');
if(newValue == '' && Likelyhood=='');
{
g_form.clearValue('u_riskscore');
}
}
else
{
var Likelyhood=g_form.getValue('u_likelyhood');
if(newValue == '' && Likelyhood=='');
{
g_form.clearValue('u_riskscore');
}
}
}

View solution in original post

20 REPLIES 20

Prasad Pagar
Mega Sage

Hi Surya,

There are multiple ways

1. Create None record in your Data lookup definition table

OR

2. Create On change client script on Problem Impact/Likelyhood which should check if both None then set value of Risk score to 0 or None.

Hope this helps

Thank you
Prasad

Hi prasad,

its helpful if i get an example on it.

Regards,

surya.

 

Hi Surya,

Something like this. I taken example of Impact and Urgency

find_real_file.png

hi ,

im trying but it showing error,