AnsweredAssumed Answered

Programming workflow with privileges and script triggers

Question asked by jmc01 on May 10, 2012
Latest reply on May 28, 2012 by beverly

I'm new to Filemaker - about to create my first application using Filemaker Pro Advanced 11. However, I've been using MSAccess since the first version came out (and other programs/languages as well).


I'm designing a database application that will have workflow in it. All users will have rights to view/print all layouts, but only certain users will be able to edit certain fields. For example, "Inputters" and "Managers" will have full access, however users from accounting will only be able to edit the accounting fields (invoice # etc.) on a Job Card layout. Another example, only "Planners" can edit the planning related fields and they are the only ones that will be able to create a Job Card record. From poking around in security, I think this can all be accomplished with privileges.


However, there are certain workflow criteria that I don't think can be accomplished with priviledges alone and I think will also need scripts. For example:


1. Allowing a user to delete a customer record only if there is no historical quotes or jobs associated with the customer.

2. Allowing a user to delete a Job Request only if it has not been approved by management and a Job Card record has not been created for the Job Request.

3. Allowing a user to create a Job Card only if the Job Request has been approved by management.



I looked at script triggers and saw OnRecordCommit, which I think only triggers when a new/existing record is saved. I didn't see a trigger that will execute before a record is deleted. So what is the best way to go about programming this type of functionality? Any ideas are most appreciated.