Jump to content

12 Seats - max charge of 10


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

Recommended Posts

I am updating a DB for a charity event that keeps track of ticket sales. Here is the challenge.

There are 12 seats per table

Each seat is $500

Max charge per table is $5000

Any quantity can be sold. e.g. - 32 seats = (2 tables and 8 seats) charge= 5000+5000+4000

FileMaker Version: 6

Platform: Mac OS X Panther

Link to comment
Share on other sites

Sounds like an algebra problem.

Tables = Int(Seats Sold/12)

Table Charge = 5000 * Tables

Seats Remaining = Seats Sold - (Tables*12)

Seats Remaining Charge = Seats * 400

Total Charge = Table Charge + Seats Remaining Charge

Link to comment
Share on other sites

Hi rivet,

To accomplish the outcome you are looking for in a single step, you may wish to use the formula:

Int(sold/12) * 5000 + Min(10, Mod(sold, 12)) * 500

Attached is a revised copy of your test file which includes the above formula and also has relevant corrections to the formulae which you were using to calculate the individual steps. wink.gif


Link to comment
Share on other sites

Hi Ray, in looking at your formula with regards to the min function, I was not aware that you could use direct entry numbers in the min function. In looking at the formula above I would have expected to get an error upon entry stating that 10 was not a valid field. The way the help explanation reads only field names are allowed in the Min function. Is this another undocumented feature or am I interpreting something wrong concerning min?


Link to comment
Share on other sites

Hi Rod,

The Min( ) function can be applied to any series of entities that are resolvable numerically, so that can be a series of numbers, of expressions (so long as they produce a numeric result), fields, field repetitions or related records. A mix of numbers, fields and/or expressions is also possible.

This has been the case through many versions (and is still so in version 7), though you woudn't know it from the manuals and the online help documentation. So I guess that yes, it is another undocumented feature... But then, if the documentation provided by FMI were to fully explain all the applications and permutations of every function and feature of FileMaker, they'd need a semi-trailer to deliver the manual. wink.gif

Link to comment
Share on other sites

This topic is 6502 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.