From Dwayne Wright PMP, PMI-ACP, CSM
Certified FileMaker Developer
Not to be too negative, but a common reason to build a found set is to ... well ... delete it. The delete found set can be performed by the menu command and by a script step. There are considerable dangers involved with allowing users of FileMaker files the ability to delete records. For starters, there isn’t any "undo" feature for deleted records built into FileMaker. Once a record is gone, it's time to hope there is a recent backup handy.
Another danger involves the way you can setup your relationships between
FileMaker files. In the relationships setup dialog box, you can have related records automatically deleted, when a master record is deleted. Sounds good in theory, kind of like cleaning up after yourself. However, what if those related records were related to others and the delete relationship option was on? To make a long story shorter, this little option can be responsible for deleting thousands of records, all with the accidental deleting of one primary record.
If you are not a student of database relationships, I’ll try to make this as painless as possible. You can have multiple FileMaker files linked together. This allows you to organize your data sources into individual files, such as Clients, Invoices, Inventory and such. With relationships, you can have them linked together so the invoice file can see or capture information it needs like Client information or Inventory levels. With relational cascading deletes, you could delete a client record, that deletes associated invoices, that deletes associated products, back to associated invoices for those products and even back to associate clients to the associated invoices. So you can see that the cascading relational deletes is not something to take lightly.
YOUR OPTIONS ( NUMBER 1 )
Add security access to your database solution. Set the access of each privilege set to not have the ability to delete... except the master privilege set of course. DRAWBACK : Well, no one can delete a record. Your database will quickly suffer from blank and incomplete records. You can put in a field that indicates the user wants to delete a record. Then have a cleanup script run at the end of the day. This is not an elegant solution, but for some short lived databases, it may be a viable option.
YOUR OPTIONS ( NUMBER 2 )
Add security access to your database solution. Set the access of each privilege set to have editing capability only in the menu commands. DRAWBACK : Many of the normal menu commands are missing such as FIND, FIND ALL and DELETE. You will need to create buttons on all the layouts that restores the things that used to be in the menu. This also does nothing about the UNDO delete issue.
YOUR OPTIONS ( NUMBER 3 )
With FileMaker Advanced, you can create custom menus. So you can remove the Delete Found Set menu. DRAWBACK : You cannot dynamically add or remove menu commands or even menu sets. You can script the process of installing a particular menu set but then you have to make sure that script is executed when necessary.
More info about the author and FileMaker in general, contact me at firstname.lastname@example.org.
© 2008 - Dwayne Wright - dwaynewright.com
The material on this document is offered AS IS. There is NO REPRESENTATION OR WARRANTY, expressed or implied, nor does any other contributor to this document. WARRANTIES OF MERCHANT ABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY DISCLAIMED. Consequential and incidental damages are expressly excluded. FileMaker Pro is the registered trademark of FileMaker Inc.