The CreatorCon Call for Content is officially open! Get started here.

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

Hi ,

when i try this it showing like this,

find_real_file.png

wwhen i select problem impack has none and likelyhood is none it showing changing value in riskscore

find_real_file.png

Hi,

1. Your Field Name should be Problem Impact

 

 

find_real_file.png

2. Change the code to this

You need to provide correct logical names for the fields

var likelyhood = g_form.getValue('addcorectlogicalnameoflikelyhoodhere');

if(newValue == '' && likelyhood == '')
{

g_form.clearValue('addcorrectRiskscorefieldnamehere');

}

 

 

 

 

 

 

 

Hi i tried but its not getting when i select both problem impact and likelyhood, the risk score not showing none or empt value,

find_real_file.png

surya65
Tera Contributor

when i try to update with "Nune" for both problem impact and likelyhood previous value not getting changed in riskscore. 

find_real_file.png

Can you please show me choice list for these 2 fields?

find_real_file.png