Lotus Formula @if

5 pts.
Tags:
Lotus
Lotus development
Lotus Notes 6.5.x
Louts Notes 6.5.4
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: October 6, 2009  2:17 PM
UPDATED: October 9, 2009  1:50 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

Try this:

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

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Stiletto
    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 )
    2,935 pointsBadges:
    report
  • Ledlincoln
    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))
    1,620 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following