Jump to content

If TextField1 = "X" then TextField2 = "a different X"


This topic is 4369 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

Ok, so I'm pretty new to FM, so bare with me. What I'm trying to do is set up a text field that checks to see if the text in field ShipTo_State = TX, if it does then I want it to auto fill another field that would have "8.25%", however if it doesn't have TX then I'd want it to say 0%.

I'm trying to use:

If(ShipTo_State = "TX"; Taxed = "8.25%")

With "Taxed" field as my output text field, but if I put in TX in the state field, I get 0% in the "Taxed" Field, but if I put in any other state, it leaves the "Taxed" field blank.

Any help would be appreciated!

If you need more info, I'd be happy to explain further!

Thanks,

Andrew

Link to comment
Share on other sites

If(ShipTo_State = "TX"; Taxed = "8.25%")

The correct syntax is:

If ( ShipTo_State = "TX" ; "8.25%" ; "0%" )

Tax rates change. It would be better to keep the rate in a field somewhere as data, instead of hard-coding it into a calculation formula.

See also:

http://fmforums.com/forum/topic/74315-bear-vs-bare/

Link to comment
Share on other sites

  • Newbies

Well as I stated, I'm pretty much completely new to FM, so I'm not sure how to do that lol.. I do understand that if tax rates do change and I have to manually change it in the calculation that It's going to change all previous invoices as well? Is it simple to add it like you said?

Link to comment
Share on other sites

This topic is 4369 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.