I am trying to calculate BMI from Height (pulling height as previous observation) and Weight (as a new observation). I am using the Calculate BMI action button, Type: Calculation, Target item: BMI but whatever I type in the box is not calculating and is giving me complier errors. Any help will be appreciated? Thanks, Jude
Try it without { } and if that doesn't work can we see you code for the button process.
That's what I am using
((OBSNOW("WEIGHT")/2.2)/((OBSANY("HEIGHT")/39.4)^2)
Looks like you have one to many "("
try
(OBSNOW("Weight")/2.2)/((OBSNOW("Height")/39.4)^2)
or you can use this
If (OBSNOW("WEIGHT")=="" OR OBSNOW("HEIGHT")=="") then ""
else
(OBSNOW("Weight")/2.2)/((OBSNOW("Height")/39.4)^2)
endif
it just checks for blank fields
Cecild thank you. I tried both I don't get the compiler error anymore but it does not calculate, basically I click on Calculate BMI button and nothing happens.
Cecild It worked thank you so much 🙂
your welcome, glad I could help.