Lotus Formula @if
5 pts.
0
Q:
Lotus Formula @if
Have a subform that I am trying to set the value of Tax based on a plant field and useage. If the Plant is 3 then tax is 5% for everthing. If Plant is 1 or 2 then tax is 7% on non production and 0% on production.

Here is the code for the Tax field.

@If(Type3 != "Plant#3") & @If(Prod != "Production");@Sum(SubTotal * 0.07);@If(Type3 = "Plant#3");@Sum(SubTotal * 0.05);0



Software/Hardware used:
lotus notes 6.5.4
ASKED: Oct 6 2009  2:17 PM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
1220 pts.
0
A:
 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0
  • AddThis Social Bookmark Button
Try this:

@If(Type3 != "Plant#3"; SubTotal * 0.05; @If(Prod != "Production"; SubTotal * 0.07; 0))
Last Answered: Oct 7 2009  3:04 PM GMT by Ledlincoln   1220 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Stiletto   1155 pts.  |   Oct 7 2009  4:06PM GMT

Actually, I don’t think you need to specify the second @If (and I don’t think the code above calcs the tax correctly); this should work:

@If(Type3 = “Plant#3″; SubTotal * 0.05; Prod = “Production”; 0; SubTotal * 0.07 )

 

Ledlincoln   1220 pts.  |   Oct 9 2009  1:50PM GMT

Stiletto is right; I had a logic error (the first !=). This, or Stiletto’s version would be correct.

@If(Type3 = “Plant#3″; SubTotal * 0.05; @If(Prod != “Production”; SubTotal * 0.07; 0))

 
0