Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

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% :

Posted

I am not sure I understand all of that correctly, but maybe

(2 * (DistanceActual - 15) / 5) + 5 + (Gap = "yes") * GapFee

will help?

Posted

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

Posted

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.

Posted

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

Posted

;) 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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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