Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

Interdependent calculations- how to?


Level 2

Can you help in designing actions in the attached form (Designed with Live

Cycle ES)

1) When the weight in pounds is entered, it should change into Wt (BW) in

Kg by using formula : Wt. in pounds/2.2

2) When Ht in inches and weight in pound is entered, it should calculate

BSA (in meter sq) by applying the following formula:

BSA (m²) = ( / 3131 )½

3) After weight in Kg is calculated by above action, It should calculate a)

Ideal Body weight by the formula

Ideal Body Weight (men) in Kg = 50 + 2.3 ( Height(in) - 60 )

Ideal Body Weight (women) in Kg = 45.5 + 2.3 ( Height(in) - 60 )

and after Ideal Body weight is calculated it should be able to calculate

Ajusted Body Weight by formula

Adjusted BW in Kg = Ideal BW in Kg + 0.4 (Actual BW in Kg- Ideal BW in Kg)

Adjusted BW in Pounds = Adj BW in Kg x 2.2

4) Ajusted BSA is calculated using the formula above for BSA calculation

using height in inches and Adjusted BW in pounds.

5) Creatinine Clearence is calculated by

CrCl = (in Kg) / (Scr x 72) . If sex is selected as F,

the Cr.Cl would be

CrCl = (in Kg) / (Scr x 72) (x 0.85)

6) AUC is calculated by Cr cl + 25

7) Is it possible to calculate total dose based on dose x dose per whatever

unit is selected from the dropdown list?

I am a novice and have designed this but have no knowledge of java or any

language. If you or someone you know can help?

It will be higly appreciated.

Naresh Gupta

9 Replies


Level 7

For any formula you need to put the calculations in the calculate event of the field where you want the answers to show. So for example, to multiply 2 fields together you could do (in formcalc):

$ = NumericField1 * NumericField2

You would obviously need to rename the fields to whatever yours are called and adjust the formula to what you actually want it to do.

Hope that helps.


Level 2

Thanks a lot.

I have another question

How do I incorporate a different formulas for calculation of Ideal BW when

field in the form indicates that the subject is Female.

Ideal Body Weight (men) = 50 + 2.3 ( Height(in) - 60 ) ( Devine formula)

Ideal Body Weight (women) = 45.5 + 2.3 ( Height(in) - 60 ) (Robinson




Level 7

you would use an if statement. So it would go something like this (in formcalc):

if (gender == "female") then

     $ = ....

else $ = .....


Again the bit within the () would be renamed depending on how the user says their gender eg. textfield, radio buttons etc.


Level 2

I tried this for Creatinine Clearance.

form1.#subform[0].Paragraph[1].NumericField6::calculate - (FormCalc,


if(DropdownList16 == M)then

NumericField6 = (140 - NumericField15) * (NumericField5[0]) /

(NumericField14 * 72)

else NumericField6 = NumericField6 * 0.85


If I just calculate creatinine clearance based on the above formula, with

no if , else or end issues, it works fine.


You have been a big help, I must say.



Level 7

you need to put the M into "" so it should be:

if (DropdownList16 == "M") then ....


Level 2

I am making a great progress, guided by you.

i want to ask if the following expression is correct?

if(Dropdownlist15 == "M2")then

NumericField10 = NumericField16 * NumericField8[0]

if(Dropdownlist15 == "KG")then

NumericField10 = NumericField16 * NumericField5[0}



where M2 and KG, NumericField 8[0] and NumericField5[0] belong to paragraph

1 and NumericField10 and NumericField16 belong to a table in the same form.

Should it matter?

Thanks a bunch again.


Level 7

Well firstly you code above is incorrect.

It either has to be:

if(Dropdownlist15 == "M2")then

NumericField10 = NumericField16 * NumericField8[0]

elseif(Dropdownlist15 == "KG") then

NumericField10 = NumericField16 * NumericField5[0}



if(Dropdownlist15 == "M2")then

NumericField10 = NumericField16 * NumericField8[0]


if(Dropdownlist15 == "KG")then

NumericField10 = NumericField16 * NumericField5[0}


depending on what you want to do.

In regards to certain fields being in a table you will need to reference them properly, so something like Table1.Row1.NumericField10.


Level 2

I have come a long way. I really appreciate your support. I am going to try



how will I write

BMI= Weight in KG /(Height in M2)2

I dont know how to give expression to "square", e.g I learnt squareroot is

written as "Sqrt"

and where can I find these expressions



Level 2


After few hits and trials, it worked out great. I am really happy with LC

Designer. I cant tell you how much I appreciate your promptness and

patience with novices like me.