Chip, I think you would have to - Iterate through all the tables and all their fields - Build a map of all the relations (maybe a simple pair of arrays for the parent and child table numbers) with GET RELATION PROPERTIES - then you'll easily be able to check the map to find out what's related to what
Sounds a bit long-winded but it should be fairly fast. Pat On Tue, 8 Jan 2019 at 21:58, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> wrote: > Thanks! > > As you might guess from the pseudo code, I am looking to have some > generic code to check for record dependencies before doing something > (most likely deletion) > > So, given a record in [Table], I want to follow (1 level) all relations > to check for related record dependancies, and kick back a > warning/boolean that there are/are not dependancies. > > Chip > > On Tue, 8 Jan 2019 21:38:06 +0000, Keisuke Miyako via 4D_Tech wrote: > > I follow every 1-to-n and n-to-1 relations in this component > > > > https://github.com/miyako/4d-component-classic-query-editor > > > > mind you, relations can be circular... > > > > 2019/01/09 5:47、Chip Scheide via 4D_Tech > > <4d_tech@lists.4d.com<mailto:4d_tech@lists.4d.com>>のメール: > > > > --- if there are 1 or more relations, I want 'follow' each relation to > > determine if there exists 1 or more related records at the other end of > > the relation - I am not sure I know how to do this > > > > > > > > ********************************************************************** > > 4D Internet Users Group (4D iNUG) > > Archive: http://lists.4d.com/archives.html > > Options: https://lists.4d.com/mailman/options/4d_tech > > Unsub: mailto:4d_tech-unsubscr...@lists.4d.com > > ********************************************************************** > --------------- > Gas is for washing parts > Alcohol is for drinkin' > Nitromethane is for racing > ********************************************************************** > 4D Internet Users Group (4D iNUG) > Archive: http://lists.4d.com/archives.html > Options: https://lists.4d.com/mailman/options/4d_tech > Unsub: mailto:4d_tech-unsubscr...@lists.4d.com > ********************************************************************** -- ************************************************* CatBase - Top Dog in Data Publishing tel: +44 (0) 207 118 7889 w: http://www.catbase.com skype: pat.bensky ************************************************* ********************************************************************** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **********************************************************************