Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

Average Rating of Numeric Fields

Avatar

Level 2

I have a script I am running to create the average rating of several numeric fields called "NumericField127"

The scrip that I am running is this

TopmostSubform.Page2.AvgRating::calculate - (FormCalc, client)

// check for divisor having a value and not zero

if

(HasValue(TopmostSubform.Page2.Paragraph.TotalRating) and TopmostSubform.Page2.Paragraph.NumberOfItems<> 0) then

// perform division

Page2.Paragraph.TotalRating / Page2.Paragraph.NumberOfItems

else

// display nothing

""

endif

I get an error each time I fill out one of the blank "NumericField127" boxes. I had to delete a number of numeric fields and I am sure that has something to do with it. What do I do to correct this error?

0 Replies