Hello,
Could you please help me with the following calculation:
Height registration is in feet & inches.
Weight registration is in pounds & LBS.
I want to calculate the BMI for example:
//Calculate pounds
dec = row.Today_s_Weight_st_lbs.toDecimal() * 100;
num = row.Today_s_Weight_st_lbs.toLong() * 14;
pounds = (dec + num);
//Calculate inches
dec1 = X.Height_ft_ins.toDecimal() * 100;
num1 = X.Height_ft_ins.toLong() * 12;
inches = (num1 + dec1);
//BMI Calculation
row.BMI = (pounds * 0.45) / ((inches * 0.025) * (inches * 0.025)).round(0).toLong();
The problem is it doesn't work. Can anyone help me?