I do not know why... but doing a simple query now works..... John, all of the following queries (now) work.
: ($Selected_Search="has Inventory") QUERY SELECTION([Bench_Protocols];[Bnchprot_LabInv_Link]Bench_Protocol_ID=[Bench_Protocols]Bench_Protocol_ID) : ($Selected_Search="has Attached Files") QUERY SELECTION([Bench_Protocols];[BnchProt_File_Link]Bench_Protocol_ID=[Bench_Protocols]Bench_Protocol_ID) : ($Selected_Search="Is Used by an Experiment") QUERY SELECTION([Bench_Protocols];[Bnchprot_Exper_Link]Bench_Protocol_ID=[Bench_Protocols]Bench_Protocol_ID) The structure for all of these queries is: [Bench_Protocols] <--[BnchProt_xxxx_Link]--> [xxxx] I believe that it is possible to query across as many relations as you want/have as long as there is a (drawn line) relational path between the 2 tables in the query. ex: Query([Bench_Protocols]; [xxxx]Field=$SomeValue) On Wed, 24 Oct 2018 07:55:51 -1000, JOHN BAUGHMAN via 4D_Tech wrote: > Chip, > > I may be wrong but I don’t think you can query a table based on a > many table relation. I would… > > RELATE MANY SELECTION([BnchProt_File_Link]Bench_Protocol_ID) > RELATE ONE SELECTION( [BnchProt_File_Link];[Bench_Protocols] ) > > John > > > John Baughman > Kailua, Hawaii > (808) 262-0328 > john...@hawaii.rr.com <mailto:john...@hawaii.rr.com> > > >> On Oct 24, 2018, at 7:32 AM, Chip Scheide via 4D_Tech >> <4d_tech@lists.4d.com> wrote: >> >> Structure: >> [Bench_Protocols] <- [BnchProt_File_Link] -> [Attached_Files] >> >> QUERY SELECTION BY >> FORMULA([Bench_Protocols];([BnchProt_File_Link]Bench_Protocol_ID=[Bench_Protocols]Bench_Protocol_ID)) >> >> I have tried: >> QUERY SELECTION >> ([Bench_Protocols];[BnchProt_File_Link]Bench_Protocol_ID=[Bench_Protocols]Bench_Protocol_ID) >> >> >> The relations are manual and I have tried adding >> SET AUTOMATIC RELATIONS(True;True) >> >> there are records in the linking table ([BnchProt_File_Link]) with IDs >> that match [Bench_Protocols] records, but nothing returns any records. >> >> Ideas? >> Thanks >> Chip >> >> --------------- >> 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 >> ********************************************************************** > > ********************************************************************** > 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 **********************************************************************