1 Reply Latest reply on Feb 8, 2011 9:06 AM by philmodjunk

    Better way for conditional calculations?



      Better way for conditional calculations?


      In my work order database I have a field for sales tax.  Since I do a lot of wholesale work, out of state work, and exempt work I made this field a conditional calculation based upon the the selected repair billing type.  This is selected from a value list of 5 entries, of which the only to get taxed is "Retail".

      I have the tax field set up to be auto entered as a calculated value using the following formula

      If ( Repair Type = "Retail" ; Repair total * .0875 ; 0 )

      The issue I am having is if I have the Type field set as Retail but then change it to another value from the list the value in the Tax field does not change.

      Is the formula I have chosen to use the issue (is there a "better" way) or am I just missing a check box someplace that is preventing it from behaving properly?



        • 1. Re: Better way for conditional calculations?

          If this were a field of type calculation, changing the value of Repair Type would automatically update the value returned by this calculation. Since it doesn't, you probably have a field of type number with this expression used as an auto-entered calculation. If so, there's a check box: "Do not replace existing value..." that should be cleared so that subsequent updates of the value of Repair Type will cause this expression to re-evaluate and enter a new value.

          Suggestion: instead of entering 0.0875 for your tax rate, put this value in a field somewheres. Then, when the government changes the tax rate, you don't have to redefine this expression, you just enter the new rate into the field.