0 Replies Latest reply on Mar 7, 2014 2:45 PM by pbhud

    Need help with FormCalc or JavaScript calculation


      I have created a form in LiveCycle ES3. The user selects one of 4 options in a radio button list where each options is a set amount of hours (6, 12, 18 etc.). There is a list of approximately 20 events each with a specific amount of time (15 minutes, 1/2 hour, 1 hour, etc.) I have a grand total that calculates as the user selects the individual items. If the user selects any one of the radio buttons (let's say 6 hours) and the total exceeds that amount I need two actions 1) they have to stop and 2) a message displays that says they must deselect some items or select a different button (with more hours). I have the grand total adding in the calculate event of the Grand Total field using FormCalc. Do I need to switch to JavaScript? Could someone help with either FormCalc or JavaScript.


      Here is an example of a formula for calculating the time for any one of the items:

      if (Attendance == 1) then

          $ =  1.50


          $ =  0.00



      The grand total is compiled in FormCalc (in the calculate event) as follows:

      Sum(Table1.Row1.AttendanceT + Table1.Row2.BirthT + Table1.Row3.CommunityT + Table1.Row4.CustomFiltersT + Table1.Row5.DataEntryT + Table1.Row6.DisabilitiesT + Table1.Row7.EducationT)


      Any help would be greatly appreciated!