Have you considered the possibility of preventing the orphans to begin with?...If you create an AL that happens on Window Close where Operation = "CREATE" that does a delete query on it's child tables base on the GUID you have already generated...if you wanted to keep it dynamic...you could push the Form and GUID to another form to create a new record and then have that one do a lookup of which tables are children of the parent in question and then have a filter do the delete query action.
L. J. Head Software Engineer Remedy Approved Consultant -----Original Message----- From: Action Request System discussion list(ARSList) [mailto:[EMAIL PROTECTED] On Behalf Of Mathieu Pitre Sent: Friday, September 01, 2006 8:33 AM To: [email protected] Subject: Deletion of non-reference entry mechanism Hi all, I need your attention on this one. I am becoming creative and I wonder if I should. I am trying to figure how to automaticly delete the entries which have no more reference to their parent. Let me explain the situation first. I have one form called Parent and a second one called Child(Parent and child relation). First, once a user opens a new Parent form I generate a GUID. I am using the GUID because the user might create a child relation before they save the form(In that specific case I could not transfer the RequestID). That way, I can transfer it(GUID) to my child form in order to keep my reference. However, if my users dont save their parent form and just cancel it I would like to delete all the child entries which are now useless. Now that everyone understand the situation what is the best approach taking in consideration that I have multiple application and multiple parent and child relation. I would like to avoid the redundancy in the way I develop this to come up with a generic mechanism. Here is what I did so far: 1- Form Name = AutoDeletionEntry a) Character field = EntryToDelete (Form and Entry to delete) b) Filter on sumbit run process Application-Delete-Entry $EntryToDelete$ I use the form and filter above to automaticly delete an entry from a button. From now on, all the delete entry occure from an action uses the form and filter state above. It works like a charm. I would like to use the same form and filter (if possible) to delete my orphans. In fact, I was taking about creating a escalation job to detect my orphans in order to push the values (Form name and EntryID) to my AutoDeletionEntry form but I cannot get any generic way of managing all the forms at once. Any suggestion? Mathieu Pitre IT Business Systems Analyst CSC @ P&WC ____________________________________________________________________________ ___ UNSUBSCRIBE or access ARSlist Archives at http://www.wwrug.org _______________________________________________________________________________ UNSUBSCRIBE or access ARSlist Archives at http://www.wwrug.org

