Re: Finding ANY Related Value
- From: eyebrown@xxxxxxxxxxxxxx
- Date: Wed, 26 Mar 2008 07:17:14 -0500
In article
<4dcff3a1-d13c-4c38-a740-7199a1264a3c@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>, d-42
<db.porsche@xxxxxxxxx> wrote:
Then if you want how many there are you can count them on their
primary key using the Count function...
countRecords = Count(matchrelationship::primarykey)
or if you just want 'yes/no' there are matching records then define a
calc
hasMatching = not IsEmpty(matchrelationship::primarykey)
I'd go with CountRecords. I do several similar things in a large FM6
solution. First I'd set up a calc field in the related file
MatchCounter = Case (MatchField = WhatIWant, 1, "")
Then over in the primary file that primary that PatternCount is replaced by
If (Sum(Related::MatchCounter) > 0)
Do what a match calls for
else
Do what a non-match calls for
EndIf
Steve Brown
.
- References:
- Finding ANY Related Value
- From: Peter Sturges
- Re: Finding ANY Related Value
- From: Helpful Harry
- Re: Finding ANY Related Value
- From: d-42
- Finding ANY Related Value
- Prev by Date: Re: Bento
- Next by Date: Re: Finding ANY Related Value
- Previous by thread: Re: Finding ANY Related Value
- Next by thread: Re: Finding ANY Related Value
- Index(es):