Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

simple check mark calculation

Avatar

Level 2

All i want is the checkbox to check it self if  certain percent is meant. If not

leave it empty. Here is what i tried. I tried it on calculate even on the checkbox itself. Does not run.

if (te1.rawValue >= 98)

{checksat ==1}

else

{checksat == 0}

1 Accepted Solution

Avatar

Correct answer by
Level 9

Hi,

Put the script in the exit event of the fields of the percentage.

Thanks,

Bibhu

View solution in original post

5 Replies

Avatar

Correct answer by
Level 9

Hi,

Put the script in the exit event of the fields of the percentage.

Thanks,

Bibhu

Avatar

Level 2

I thanks for the input, but it still did not run. Does this happen because i also have the fields set to do calculation scripts well simple math anyway

?

Avatar

Level 5

hI

The code doesn't look right can you try

if (te1.rawValue >= 98)

{checksat =1}

else

{checksat = 0}

hope this helps

Malcolm

Avatar

Level 2

well thanks for trying but it is basically the same code i wrote in my question.

Avatar

Level 5

yes it is basically the same except I change your "==" which is for checking if the value is equal to something to "=" which assigns the value.

and I have also just noticed that you may need to add ".rawValue" to the assigning statements

e.g.

if (te1.rawValue >= 98)

{checksay.rawValue =1}

else

{checksat.rawValue = 0}

Hope this helps

Malcolm