Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.filemaker > #3257

Re: Detecting No Related Records

Path csiph.com!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!buffer1.nntp.dca1.giganews.com!buffer2.nntp.dca1.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date Tue, 30 Jul 2019 21:27:22 -0500
Newsgroups comp.databases.filemaker
Subject Re: Detecting No Related Records
From csampson@inetworld.net (Charles H. Sampson)
Date Tue, 30 Jul 2019 19:27:23 -0700
Message-ID <1objkhl.1u8ai461ffs7ibN%csampson@inetworld.net> (permalink)
References <1obhm6m.hdoyrw1jr4ctoN%csampson@inetworld.net> <qho6eo$ofp$1@gioia.aioe.org>
User-Agent MacSOUP/2.8.5 (ea919cf118) (Mac OS 10.12.6)
Lines 40
X-Usenet-Provider http://www.giganews.com
X-Trace sv3-EhQV5SgydxFBHFDKYEqcM/kLR1xUIJ6/FDGNIkRuzQqYPsGef1fjfTPve6f9rv+ybb5YI+pCLQYD7Do!pUGDY4jqn9wm2ts+3c7obMa1ThaatsFeV0DVMWkE2vLzpza7McshN0g/IKCMlyG2u9KbbJbn8dgq
X-Complaints-To abuse@giganews.com
X-DMCA-Notifications http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info Otherwise we will be unable to process your complaint properly
X-Postfilter 1.3.40
X-Original-Bytes 2762
Xref csiph.com comp.databases.filemaker:3257

Show key headers only | View raw


Helpful Harry <HelpfulHarry@BusyWorking.com> wrote:

> On 2019-07-30 01:13:20 +0000, Charles H. Sampson said:
> 
> > How do I detect that a record has no related records? I've found that
> > "Go To Related Record" doesn't protest if there are no related records
> > so catching an error doesn't work. I've also searched the Get functions
> > for something that returns a count of related records to no avail.
> 
> 
> There's probably a few ways, but perhaps the easiest is to simply count
> the number of related records using a related field that must always 
> contain data - the obvious one being the related records' Child-Key 
> field itself. In the Parent Table, you can create a Calculation field
> like:
> 
>     NumRelatedRecords    Calculation, Number Result
>         = Count(Relationship::Related_Child_KeyField)
> 
> or you can simply use the same calculation in a Script, within an If 
> statement's test for example..
> 
> If that calculates as zero, then there are no related records.
> 
> You may even already have that field in the Parent Table since it can
> often be handy to display the count underneath a Portal.
> 
> Helpful Harry  :o)

Worked like a champ, Harry. Thanks yet again. You'd think (or at least I
would think) that with the many Get functions, not a few of them having
to do with the number of records in a set, there would be one something
like Get (RelatedRecordsCount).

Charlie
-- 
Nobody in this country got rich on his own.  You built a factory--good.
But you moved your goods on roads we all paid for.  You hired workers we
all paid to educate. So keep a big hunk of the money from your factory.
But take a hunk and pay it forward.  Elizabeth Warren (paraphrased)

Back to comp.databases.filemaker | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Detecting No Related Records csampson@inetworld.net (Charles H. Sampson) - 2019-07-29 18:13 -0700
  Re: Detecting No Related Records Helpful Harry <HelpfulHarry@BusyWorking.com> - 2019-07-30 13:27 +1200
    Re: Detecting No Related Records csampson@inetworld.net (Charles H. Sampson) - 2019-07-30 19:27 -0700
      Re: Detecting No Related Records none@gmail.com - 2019-07-31 20:35 +0200

csiph-web