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.

Please Help FormCalc syntax error..

Avatar

Level 1

form1.#subform[0].Table2.FooterRow.total::calculate - (FormCalc, client)

(((sum(Table2.row[

*].total)

if(Table2.FooterRow.total>0)

then(+15)endif)))

Error: syntax error near token 'if' on line 2 colum 2

Ive played with it so many times, now I have no idea what ive done and not done..

ugh.. ive spent way to much time on this

What I want if the calculation returns a value other than 0 to add the 15.. if its 0 dont add the 15..

Seems simple enough..

Thanks

1 Reply

Avatar

Level 10

Try like this..

if(Table2.FooterRow.total ne 0)then

     $.rawValue = $.rawValue +15;

endif

I did not understand the previous line in your code..So I am placing the following with my own assumptions.

if (sum(Table2.row[

*].total) >0) then

     $.rawValue = $.rawValue +15;

endif

Thanks

Srini