1 of 1 people found this helpful
The typical method for doing this involves using record-specific access privileges. You allow the record to be edited when a calculation is true, such as:
IsEmpty ( printDate )
You'd need to insert this in both the Invoice and Line Items tables. It's considerably more secure than trying to do it at the interface level.
I like this idea, but I assume you mean using the calc as a validation formula for each field in the tables. There doesn't seem to be away to apply a validation formula to whole tables in FileMaker's security system. The privilege sets appear to only allow data in tables or the fields in them to be added, deleted, or modified. I don't how to insert a formula.
I think Mike' approach is what you need let me explain you a liitle bit more.
You just need a field in your invoice table and one field in the related table that you add the items (I am assuming you use a portal) lets call this field lock (in both tables) when you datestamp the record as finished you script to set the field in the master record as 1 and by using a go to portal row etc in every line in the portal you set 1 to the field called lock also.
All your users you put them in a limited privilege set they cannot delete the record and they can edit if isempty(lock) (in both tables)
What djmike said.
Here's some more detail:
In your Security dialog, select "Custom" under "Records". You'll get this dialog:
If you pull down under "View" in the targeted table, choose "Yes". (Presumably, you always want records to be viewable.) Then, you can choose "Limited" under "Edit" and under "Delete". That's where you put in your calculation.
Ah, yes. I see. I was looking at the Field Access drop down list in the Custom Record Privileges dialog