Chip:

The compatibility setting is there if the structure is older than V11, I'd
assume, because this feature is essentially SQL, which was introduced in
V11.

Check out the docs for QbF - it says auto relations aren't used "as a rule"
but gives a couple of instances when the are used.

Thomas Maul has mentioned them on the Forum and I found a couple of KB
entries. Check out http://kb.4d.com/assetid=75164 and
http://kb.4d.com/assetid=75165. Just read through them and latter one was
helpful in explaining how the command is structured.

I've used QbF to do relational searches to find Proposals by fields in
related Line Item, Option Items, and Documents. Rather than build a monster
query statement, I called Set query destination into a set and unioned the
sets after each QbF runs. It's blindingly fast.

--
Douglas von Roeder
949-336-2902


On Wed, Oct 24, 2018 at 11:36 AM Chip Scheide <4d_o...@pghrepository.org>
wrote:

> Doug,
> Thanks
>
> no compatibility setting - so it must already be on.
> I realized that the auto relations should not come into play - but when
> things are not working, you try ... well... whatever.  :)
>
> I know about query execution, but have never really looked into it.  I
> will.
>
> On Wed, 24 Oct 2018 10:54:56 -0700, Douglas von Roeder wrote:
> > Chip:
> >
> > Check your settings in Database Settings/Compatability - check the query
> by
> > formula uses SQL joins and you'll want to Execute QbF on Server, as well.
> > :-)
> >
> > I don't think that Auto relations comes into play.
> >
> > Try creating the join yourself, a la:
> >
> > QUERY BY
> > FORMULA([Contacts];([Proposal_Contact_Link]ProposalID=$proposalID_T) &
> > ([Contacts]ID=[Proposal_Contact_Link]ContactID))
> >
> > Also, and I meant to give you a heads up on this the other day, it can be
> > very helpful to see how 4D is running the query. I call this code before
> a
> > query DESCRIBE QUERY EXECUTION(True) and call QRY_QueryPlanToClipboard
> > after the query.
> >
> > Code in QRY_QueryPlanToClipboard:
> >
> > C_TEXT($plan_T;$path_T)
> >
> > $plan_T:="Query Plan"+Char(13)+Get last query plan(Description in text
> > format)
> >
> >
> > $path_T:="Query Path"+Char(13)+Get last query path(Description in text
> > format)
> >
> >
> > SET TEXT TO PASTEBOARD($plan_T+Char(13)+Char(13)+$path_T)
> >
> >
> > HTH.
> > --
> > Douglas von Roeder
> > 949-336-2902
> >
> >
> > On Wed, Oct 24, 2018 at 10:33 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
> >> **********************************************************************
> ---------------
> 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
**********************************************************************

Reply via email to