Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
Confused With Decimal Numbers!
Hi Guys/Gals
I have a slightly confusing script that should be doing nothing more than simple maths.
var E_Value; var Plus_E; var Minus_E; var Fill; var Value; Fill = nlapiGetFieldValue('custrecordfhl_gaugemas_fill'); Value = nlapiGetFieldValue('custrecordfhl_gaugemas_value'); E_Value = (Fill * Value)/100; Plus_E = (Value + E_Value); Minus_E = (Value - E_Value); nlapiSetFieldValue('custrecordfhl_gaugemas_evalue', E_Value,false); nlapiSetFieldValue('custrecordfhl_gaugemas_plus', Plus_E,false); nlapiSetFieldValue('custrecordfhl_gaugemas_minus', Minus_E,false); Initial Values are as follows:
custrecordfhl_gaugemas_fill = 4
custrecordfhl_gaugemas_value = 2.5
Results are as follows:
custrecordfhl_gaugemas_evalue = 0.1
custrecordfhl_gaugemas_plus = 2.5
custrecordfhl_gaugemas_minus = 2.4
0