4 Replies Latest reply on Apr 11, 2014 7:29 AM by ckeam87

    Custom Calculation Question


      Hi Everyone,


      I'm attempting to make an expense claim form in Adobe Pro XI and have run into an issue that I can't seem to resolve. In the mileage portion of this document, I've created a custom calucation system that multiplies the number entered into it to 0.24 (payout per km). I've also added in an auto calculator for the sum of all of the lines in the coumn (last cell in the column). The problem that I've run into is that the cell with the auto calulator is displaying the number of kms, not the total of money (cell * 0.24). Does anyone know how to fix this? Please let me know if you need any clarification.



        • 1. Re: Custom Calculation Question
          George_Johnson MVP & Adobe Community Professional

          It's not clear to me how you've set up the fields in the Mileage field. Can you show the scripts you're using?


          Why is the Total field for the Other column showing $ 1.00 when the values above it seem to be blank?

          • 2. Re: Custom Calculation Question
            ckeam87 Level 1

            I used the following script, which I found on another forum:


            As for the Total field, it's showing up as $1.00 because I took the screen shot before I moved the cursor after deleting the number in that field. It's showing as zero now.


            Thank you for your help! (I'm a newbie at this)

            • 3. Re: Custom Calculation Question
              George_Johnson MVP & Adobe Community Professional

              If that calculation is attached to the MileageRow1 field, that's not a good way to go about this. It would make sense to add a new column to the right of the mileage column with fields that calculates the total cost (mileage * 0.24), but you shouldn't set up a field to calculate based on the value that's entered into itself. Calculated field should normally be set to read-only to the user doesn't attempt to interact with them.

              • 4. Re: Custom Calculation Question
                ckeam87 Level 1

                Hi George,


                I just created a 2 columns to calculate mileage: 1 to calculate total KMs and the row that calculates the total cost (mileage * 0.24). I can't seem to get the javascript formula that I previously used to work now.



                I have no formulas in the mileage kms column (except totals row) and would like the mileage $ amount column to multiply the number from the kms row *0.24. The old formula that I was using doesn't work now.


                Thanks in advance!