0 Replies Latest reply on May 2, 2013 11:19 AM by drivewaylegend

    Average Rating of Numeric Fields

    drivewaylegend

      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?