dbTalk Databases Forums  

Prevent deletion of records with children

comp.databases.filemaker comp.databases.filemaker


Discuss Prevent deletion of records with children in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Christoph Kaufmann
 
Posts: n/a

Default Prevent deletion of records with children - 11-13-2005 , 11:57 AM






FMP 8 adv: Record deletion is out of the menu. Users may delete records
with a script, but not if the record has children.

So the script goes

If isvalid(relation::record_SNR)
Display message (who will take care of the orphans?)
Quit script
End If

for each and every relation. So if I add a relation, and I will, I'll
have to extend the script.

Are there better solutions?
--
http://clk.ch

Reply With Quote
  #2  
Old   
Michael Paine
 
Posts: n/a

Default Re: Prevent deletion of records with children - 11-13-2005 , 02:59 PM






If you have not already, you could create a USER table that includes a
field ADULT. Populate this with your list of users. Then test if the
ADULT field is "Y" in your script instead of the user name or number.
Michael Paine


Christoph Kaufmann wrote:

Quote:
FMP 8 adv: Record deletion is out of the menu. Users may delete records
with a script, but not if the record has children.

So the script goes

If isvalid(relation::record_SNR)
Display message (who will take care of the orphans?)
Quit script
End If

for each and every relation. So if I add a relation, and I will, I'll
have to extend the script.

Are there better solutions?

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.