Mitch in Halifax Posted September 28, 2005 Posted September 28, 2005 I am trying to create a script that overlays a checked item in a field called Gap (Yes/No) if true then it checks another field called GapFee which contains a check box of 40% or 50%. If 40% then it goes to a calculated field that is based on a distance travelled. It would take the distance traveled (i.e. 20 miles and then plug it into the calculation (DistanceActual - 15) / 5) * 2 + 5). This formula is either multiplied by 40%. The result of this calculation is the fee a customer pays, which is displayed in another field FeeActual. If the GapFee was checked as 50% then it would loop back to the formula and multiply it by 50% :
-Queue- Posted September 28, 2005 Posted September 28, 2005 I am not sure I understand all of that correctly, but maybe (2 * (DistanceActual - 15) / 5) + 5 + (Gap = "yes") * GapFee will help?
Lee Smith Posted September 28, 2005 Posted September 28, 2005 Hi JT, Me either. I was going to suggest that Mitch post a clone of his file and explain what he has now, and what he wanted as a result. If your calculation doesn't do it, then maybe this would be a quick way to solve it. HTH Lee
-Queue- Posted September 29, 2005 Posted September 29, 2005 Hi Lee, I agree. I cannot, for the life of me, figure out what the purpose of such a calculation would be or what Distance and Gap have to do with it.
Mitch in Halifax Posted September 30, 2005 Author Posted September 30, 2005 The file that I'm working on is for a Not-For-Profit group that is running a transportation service. In this file I have Clients, Drivers, Trips, and a secondary Billing Agency. On the Trip Requestlayout the clients and drivers are added via a drop down list. The agency has a program called Grab a Pal (GAP) that allows for a discount on the fare, 40% for a 2nd passenger and 50% for 3 or more. I have a check box (Y/N) for GAP and another check box (40%/50%) for GAPFEE. I also have a number field (Distance Travelled) that records the actual distance of the trip that needs to be rounded to the nearest 5 Kms. This distance is plugged into a calculated field (Fee Actual) via the formula ((DistanceActual - 15) / 5) * 2+5. What I'm trying to accomplish is to develop a script step that when GAP is selected Y then a invisible field would open showing the check box field GapFee. When the 50% or 40% button is selected the Fee Actual would be be recalculated. The kicker to this whole problem is that each of the clients on the drive is recognized as seperate trips. So a new trip request is entered for each client even though all three may be picked up at the same location and dropped off at the same destination. I have enclosed a clone as requested. The layout in question is Trip Request. Thanks all for your comments. Mitch EHATS_CLone.zip
-Queue- Posted September 30, 2005 Posted September 30, 2005 See if the modified attachment helps get you on your way. EHATS_Q.zip
Mitch in Halifax Posted October 3, 2005 Author Posted October 3, 2005 ;) Thanks very much for the calculation solution. This is certainly one area that I am having difficulty with. Knowing that there are a lot of generous people like yourself at FM Forums sure makes life easier. Cheers Mitch
Recommended Posts
This topic is 6992 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