Jump to content

  •  

UPGRADE DEADLINE - SEPTEMBER 26, 2014!
FileMaker Inc. has a deadline for users of version 10,11, 12 as Individual box or volume licenses (with expired maintenance).
If you don't renew your maintenance and upgrade to FMP 13 you will no longer be eligible to upgrade, at the discount pricing.

Volume Licensing upgrade pricing for FileMaker Pro 13, FileMaker Pro 13 Advanced and FileMaker Server 13 will be discontinued.
Individual upgrade pricing for FileMaker Pro 13 and FileMaker Pro 13 Advanced will increase after September 26, 2014.
As of 27-September-2014, FileMaker 10 products will no longer be available for purchase or support.

http://help.filemaker.com/app/answers/detail/a_id/13865


Photo

tables or too many finds


  • Please log in to reply
3 replies to this topic

#1 crazybake  novice

crazybake
  • Members
  • 143 posts
  • LocationSeattle
  • FM Application:12
  • Platform:Mac OS X Mountain Lion
  • Skill Level:Novice
  • Time Online: 14h 48m 46s

Posted 16 February 2012 - 05:28 PM

I need some theory help. Not sure if it is bad structure or finds. sorry for the long post

I have a solution for checking out equipment to students - with tables; Students, Equipment, Transactions, Transaction Lineitems.

This is where I may have gone wrong.... There are three types of transactions (I think): reserve, checkout, checkin. My solution only creates one transaction and one lineitem with a status field; reserve, open, complete. As the student moves through the process, the status only changes... is this correct? Or should there be seperate transactions for each? Should the status flag be placed on the equipment, not the transaction lineitem?....so confused.

I ask this because of the way the solution works currently.
1.) User scans or enters item number. A script performs a find request using "set Field x to item number" and "set field y to status open"
2.) If the results are "0", it runs a second script that performs a find using "set Field x to item number" and "set field y to status reserved" and "set field" for today's date to see if the item is reserved for that day
3.) If that results in "0", then it will allow a student to checkout the equipment....

The seconday issue is that when the student is "allowed" to checkout the equipment scripts are run to:
1.) make sure that their account isn't blocked (through a go to related record and see if block is set to "1")
2.) make sure that the equipment can be checked out to that individual (i.e. they are a first year student and the equipment can only be checked by a second year) It does this through a go to related record for equipment to see if "1st year" is checked.

This seems like way too many finds and is not elegant at all. I may be making this way too complicated.... because, the last issue is reserving.
Students are allowed to reserve items. A scirpt will run to see if the item is reserved for a particular day through a find of an item number and date. If the result is "0", it also makes sure that there is no block on the account, and that the equipment is allowed to be reserved by them.

Any help with relationships and on theory would be greatly appreciated.
  • 0

#2 imoree  master

imoree
  • Members
  • 384 posts
  • LocationBahamas
  • FM Application:11 Advance
  • Platform:Mac OS X Lion
  • Skill Level:Intermediate
  • Membership:TechNet
  • Time Online: 50d 11h 26m 39s

Posted 17 February 2012 - 10:09 AM

I would agree that this is a lot of search(s) or finds.

But the ERD is Students checking out equipment
Students, Equipment, Transactions, Transaction Lineitems.

So 1 student can rent many pieces of equipment
That means there can be many transactions
but really it is 1 to many COrrect?

StudentID - Primary Key --- Equipment StudentID - Foreign key
The reserve, checkout, checkin. are just 1 field in the Equipment Table
You can use this as a value list. ( Lets say Options)

Based on that you have what you need.

secondly:
you need to see if the student is "ALLOWED" first, before continuing to the First Script.
If they are not allowed , then you don't even need to scan the item, you know.

-i
  • 0

#3 crazybake  novice

crazybake
  • Members
  • 143 posts
  • LocationSeattle
  • FM Application:12
  • Platform:Mac OS X Mountain Lion
  • Skill Level:Novice
  • Time Online: 14h 48m 46s

Posted 23 February 2012 - 08:07 AM

That does make sense... I guess I was thinking it was easier to base transactions on the staus of an asset. On a side note... do you think it is important to have a seperate transaction for checking out and checking in? Or is simply having an open/closed/reserved flag on a single record? If this is the case, I would assume I would key this in assets as a flag.... am I thinking correctly?
  • 0

#4 imoree  master

imoree
  • Members
  • 384 posts
  • LocationBahamas
  • FM Application:11 Advance
  • Platform:Mac OS X Lion
  • Skill Level:Intermediate
  • Membership:TechNet
  • Time Online: 50d 11h 26m 39s

Posted 23 February 2012 - 09:19 AM

That does make sense... I guess I was thinking it was easier to base transactions on the staus of an asset. On a side note... do you think it is important to have a seperate transaction for checking out and checking in? Or is simply having an open/closed/reserved flag on a single record? If this is the case, I would assume I would key this in assets as a flag.... am I thinking correctly?


Think Boolean and based on true / false you can make your table open/closed/reserved flag on a single record !
Yes this would be in assets, you an call this FLAG as well.
However think
case (Flag = open; 1; Flag = closed ; 2; 3 )

hope that helps, but what do i know.
i am still learning mesefl! :)
  • 0




FMForum Advertisers