Business rule to display decimal value

snowuser111
Kilo Guru

Hi,

I want a field F1 in Incident table which will store the value (F2 * F3) where F3 can be decimal upto two decimals like 356.87.

What type F1 , F2 and F3 should be while creating is it String ?

Need business rule to store this value.

Can anyone suggest please

Thanks

1 ACCEPTED SOLUTION

function onSubmit()


{


      var a = g_form.getValue('u_people_number'); //this field should contain whole numbers - decimal


      var b = g_form.getValue('u_hours_on_swat');   // this field should contain decimal upto 3 digits.-decimal


      var c = (a*b);


      g_form.setValue('u_total_hours', c);   // this field should store value of (a*b) -decimal


          return true;


}


View solution in original post

7 REPLIES 7

Kalaiarasan Pus
Giga Sage

There is a type called 'Decimal' in dictionary.. Tried that ?


so the field for containing whole number be 'decimal' or String?


function onSubmit()


{


      var a = g_form.getValue('u_people_number'); //this field should contain whole numbers - decimal


      var b = g_form.getValue('u_hours_on_swat');   // this field should contain decimal upto 3 digits.-decimal


      var c = (a*b);


      g_form.setValue('u_total_hours', c);   // this field should store value of (a*b) -decimal


          return true;


}