crazybake Posted July 16, 2013 Posted July 16, 2013 My solution involves assets to checkout to students. One portion is to allow the students to reserve items. My tables: Students, Assets, Transactions, LineItems and a Utility table. This is where I need some guidance. Within the LineItems table I have severval date calculation fields based on the length an asset can be checked out, if we are open weekends, school holidays, breaks, etc. As a students attempts to checkout or reserve an item, I need to check and see if the item is reserved (or it is a holiday or break etc). I had been doing this by creating a new record first (so it will assign a due date) then doing a find against that - and delete the record if it failed the reserve test. I think it would be more efficient to do the check first, then create the record - should I put all of the calculations as Global fields in the utility table, then find against that - or is there a better way to calculations without first creating a record
Fitch Posted July 16, 2013 Posted July 16, 2013 Maybe you could go one better and display the reserved and available dates... Meanwhile, I think you're on the right track, I think I'd probably do the testing before creating a checkout record... but it's not necessarily "wrong" to create the record first. I wouldn't get too hung up on it if it works for you.
crazybake Posted July 16, 2013 Author Posted July 16, 2013 Would there be any issues with using global fields to do the calculations before checking? I was thinking that when a student attempts to reserve, it would at the requested reserve date to a global field. A second global field would perform a calculation to check that is not a weekend, school holiday, during a break, etc. That result would be the one to find against any current reservation. I do Like the idea of the calendar _ I currently just have one that shows each item reserved and on which day.
Fitch Posted July 19, 2013 Posted July 19, 2013 I use global fields all the time, but I tend to avoid calculated globals. You may want to have a look at this: Behavior of FileMaker Global Calculation Fields I prefer to put most of my logic into scripts, and for the scenario you described, that's what I'd suggest. I.e., use globals as needed for data entry, and then script the reservation checking and record creation.
Recommended Posts
This topic is 4503 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