2 Replies Latest reply on Aug 23, 2012 9:17 AM by G0ldf15h

    help needed with 'if then' field calculation




      I am trying to create a field on a form that adds a 20% to a basic price depending on which of the options is selected from a drop down menu that forms the title of the form


      It is a New/Used vehicle form and requires 20% VAT to be added to the basic price if the vehicle is "New".


      If the vehicle is "Used" then no VAT is to be added


      Can this be done?


      If it helps I could use radio buttons to establish whether the vehicle is "New" or "Used" at the top of the form?


      I am right out of my depth here with java - I am a lowly designer more usually concerned with simply making things look pretty on the page!


      Can you any of you 'techies' help?

        • 1. Re: help needed with 'if then' field calculation
          gkaiseril MVP & Adobe Community Professional

          Yes, and it is even possible to do this without an "if" statement and without writing any JavaScript.


          You need to know the field names. Using the following field names, types, and properties:


          SubTotal - amount to compute the tax on -  numeric field - read write - visible

          TaxRate - tax rate to apply if taxable - numeric field - read only - hidden

          Taxable - 2 check boxes same name - one export value of 1 (default is checked), the other export value 0

          TaxAmount - amount of tax to be applied - numeric field - read only - visible - calculation: "Field is the product of the following fields:", SubTotal, TaxRate, Taxable

          GrandTotal - sum of SubTotal and TaxAmount - numeric field, read only, visible - calculation "Field is the sum of the following fields:" TaxAmount and GrandTotal

          • 2. Re: help needed with 'if then' field calculation
            G0ldf15h Level 1



            No idea if you are actually technically a genius, but this works!


            Many, many thanks!