Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

FormCalc If Statement Help Needed

Avatar

Level 2
I am currently using LiveCycle Designer 7.



Originally I only had one row in a subform for which I needed this calculation. However, due to changes in requirements (as told to me by my boss) additional instances (onClick) of the subform may require the use of this calculation. Does anybody know how to get the following script to work for each new instance added?



if(exists(SF6[0].hhLowMod)==1)then

sum(SF6[0].hhLowMod/HHresp)*HHnonResp+hhLowMod

else sum(SF6[0].hhLowMod)

endif



Any help would be greatly appreciated. Also, any advice on avoiding an arithmetic over/underflow error?
1 Reply

Avatar

Level 2

Can't help you with your primary question, but try using another If level to test for 0 to alleviate the overflow error.

Something like:

if (HHresp>0) then ......the rest of what you already have followed by another endif.

The overflow is being created by your denominator being equal to 0/null before HHresp has been given a value.