Skip to main content
Inspiring
March 7, 2017
Answered

How to enter BSA calculation

  • March 7, 2017
  • 1 reply
  • 1507 views

I need to calculate BSA which is:

       Sqrt((Ht*Wt) /3600)

   

I have tried entering in everything and cannot get it right      

This topic has been closed for replies.
Correct answer m2235

The fields I have are HT and WT

I copy and pasted the code into the BSA field and still does not calculate.


Is there anything else I can do?


Thank you so much

1 reply

try67
Community Expert
Community Expert
March 7, 2017

Let's say you have fields called Ht and Wt. Enter this code as the custom calculation script for the BSA field:

var ht = Number(this.getField("Ht").value);

var wt = Number(this.getField("Wt").value);

if (ht==0 || wt==0) event.value = "";

else event.value = Math.sqrt((ht*wt)/3600);

m2235AuthorCorrect answer
Inspiring
March 7, 2017

The fields I have are HT and WT

I copy and pasted the code into the BSA field and still does not calculate.


Is there anything else I can do?


Thank you so much

try67
Community Expert
Community Expert
March 7, 2017

Did you adjust the field names in the code? Are there any error messages in the JS Console (Ctrl/Cmd+J) when you change the value of one of the fields?