Skip to main content
Inspiring
Mar 7, 2017 9:18 PM UTC
Answered

How to enter BSA calculation

I need to calculate BSA which is:

       Sqrt((Ht*Wt) /3600)

   

I have tried entering in everything and cannot get it right      

This topic is closed to new replies. Start a new post to keep the conversation going.
m2235Correct answer
Inspiring
Mar 7, 2017 9:35 PM UTC

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

8 replies

try67
Community Expert
Community Expert
Mar 7, 2017 9:31 PM UTC

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);

Translate
m2235AuthorCorrect answer
Inspiring
Mar 7, 2017 9:35 PM UTC

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

Translate
try67
Community Expert
Community Expert
Mar 7, 2017 9:44 PM UTC

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?

Translate