Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

How do I count the number of weeks without using formcalc's count function?

Avatar

Level 1

Since I'm using a form with PDF artwork and can't use tables or subforms I need to find a way to count the number of weeks based on the number of non-null date fields. Anyone know how to do this?

When I use count (Weeks[*]) I get the right number of weeks but I also get

Error arithmetic over/underflow

Script failed (language is formcalc; context is

xfa[0].for[0].topmostSubform[0].page[0].AverageMeals[0])

script = sum (MealsTotal/NumberWeeks)

When i give each Week feild a unique identifier (ie Week1) I get the same errors so it's the count function that's the stumbling block

0 Replies