Fitch Posted April 20, 2002 Posted April 20, 2002 That "or" doesn't look right. Here's a simplified version, see if this works: code: Case(Hometowner Payroll::Status="Single", Case(NFWT<102, "", NFWT<329, (NFWT-102) *.10, NFWT<1140, (NFWT-177.67) *.15, NFWT<2493, (NFWT-605.37)*.27, NFWT<5498, (NFWT-794.13)*.30, NFWT<11875, (NFWT-1466.11)*.35, (NFWT-2436.89)*.386), Hometowner Payroll::Status="Married", Case(NFWT<248, "", NFWT<710, (NFWT-248) *.10, NFWT<1983, (NFWT-402) *.15, NFWT<4219, (NFWT-1104.67)*.27, NFWT<6800, (NFWT-1416.10)*.30, NFWT<11996, (NFWT-2185.23)*.35, (NFWT-3100.22)*.386))
shorty Posted April 20, 2002 Posted April 20, 2002 I have been working on this calculation for calculating federal withholding tax based on the status field. I am not able to figure what I am doing wrong? Any help would be appreciated. code: If (Hometowner Payroll::Status="Single", If (NFWT>102 and NFWT<329, (NFWT-102) *.10, IF (NFWT>329 and NFWT<1140, (NFWT-177.67) *.15, IF (NFWT>1140 and NFWT<2493, (NFWT-605.37)*.27, If (NFWT>2493 and NFWT<5498, (NFWT-794.13)*.30, IF (NFWT>5498 and NFWT<11875, (NFWT-1466.11)*.35, If (NFWT>11875, (NFWT-2436.89)*.386, or If (Hometowner Payroll::Status="Married" If (NFWT>248 and NFWT<710, (NFWT-248) *.10, IF (NFWT>710 and NFWT<1983, (NFWT-402) *.15, IF (NFWT>1983 and NFWT<4219, (NFWT-1104.67)*.27, If (NFWT>4219 and NFWT<6800, (NFWT-1416.10)*.30, IF (NFWT>6800 and NFWT<11996, (NFWT-2185.23)*.35, If (NFWT>11996, (NFWT-3100.22)*.386," ")))))))))))))
shorty Posted April 24, 2002 Posted April 24, 2002 Thank you for the help with Withholding tax calculation. It worked great. I have since added the state withholding tax calculation and now when you click on each record it takes forever to go through the calculation process. You can just be tab from one field to another and it recalculates. I am trying to figure a way around this since it is so time consuming. Any suggestions would be helpful. Thank you again Shorty
Fitch Posted May 2, 2002 Author Posted May 2, 2002 Maybe a better approach would be to use scripts to do the calculations, and set the result into an ordinary number field. That way you can control when the updates happen. It will also speed up summaries and life in general. The downside, of course, is that it's not automatic.
djgogi Posted May 2, 2002 Posted May 2, 2002 If you could replace Hometowner Payroll::Status with looked-up value from same rel than you'll be able to make the calculation stored. Actually you are accessing the field NFWT from 2 to 9 times for every record (even if there was no change made) Dj
Recommended Posts
This topic is 8241 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 accountSign in
Already have an account? Sign in here.
Sign In Now