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.

Can I use math functions in a PDF?

Avatar

Level 1

I've got a document where scores are entered (1 - 5) in numeric fields. Is there a way to add these and average them, and output that value into another field on the fly, or by pressing a button on the form?

2 Replies

Avatar

Former Community Member

Absolutely ...you have a full javascript engine at your disposal.

Paul

Avatar

Level 7

you can also do it in formcalc.

For adding use the sum() function.

For averages use the Avg() function.

You could put the formula in the calculate event of the field you want the results to show in and it would appear as soon as the initial numers are entered, or if you want to use a button you could put the formula in the click event of the button.