Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

How to use formcalc to perform if statement / calculation using a check box

Avatar

Level 1

Hello I'm rather new to formcalc and could use some help...

I have a form I'm creating that has a check box (named  APPRAISE) followed by 4 fields. When the check box is checked I want to have the field  Appraise_Total perform a calculation using the remaining 3 fields. If the box is unchecked  Appraise_Total should display either nothing or 0. I'm not certain I have the correct the appropriate syntax for being a "checked or unchecked box"

Here is what I have.

if (topmostSubform.Page4.APPRAISE == 1) then

    topmostSubform.Page4.Appraise_Total= topmostSubform.Page4.Appraise_Ranks+topmostSubform.Page4.Appraise_Mod+topmostSubform.Page4.Appraise_Misc_Mod

elseif (topmostSubform.Page4.APPRAISE == 0)

then topmostSubform.Page4.Appraise_Total=topmostSubform.Page4.Appraise_Ranks-topmostSubform.Page4.Appraise_Mod-topmostSubform.Page4.Appraise_Misc_Mod

endif

thanks

1 Reply

Avatar

Level 1

Still looking for an answer... anyone...?