RELATE ONE SELECTION =A0strangeness
bob.miller at parker.com (6/10/14 11:16AM)
bob.miller at parker.com (6/10/14 11:16 AM)
<OF6F399413.C1C3CFB8-ON85257CF3.0052EB10-85257CF3.0053CABC@...
John,
This is indeed strange. ?If you don't use SET QUERY DESTINATION, do
you
get a different result?
If not, you can grab the unique ID of the [Appointment] record that
does
not have a corresponding [_Mechanics] record and examine it - with
other
tools, can you query and find record and, possibly the (should have
been
related) [_Mechanics] record?
color><param>00000,0000,DDEE/param>AAlternatively, you could set a
TRACE inside the if($mechanicsFound=0)
/color>cclause and inspect the [Appointment] record to get the unique
index
thereof and use that to start your analysis.
Perhaps you have a bad index...??
++++++++++++++
RE> In the following, there is a many to one relationship between
[_Mechanics]_Appointment_Sequence & [Appointment]_Appointment_Sequence
with [_Mechanics] being the many table.
ALL RECORDS([_Mechanics])
RELATE ONE SELECTION([_Mechanics];[Appointment])
zeroCount:=0
$size:=Records in selection([Appointment])
For ($i;1;$size)
?=A0GOTO SELECTED RECORD([Appointment];$i)
?=A0$mechanicsFound:=0
?=A0SET QUERY DESTINATION(Into variable;$mechanicsFound)
QUERY([_Mechanics];[_Mechanics]_Appointment_Sequence=[Appointment]_Appoi
ntment_Sequence)
?if ($mechanicsFound=0)
?=A0?=A0$zeroCount:=$zeroCount+1
?end if
End for
At the end of this loop zeroCount is 2. How is this possible?
Bob Miller, IT Manager
Chomerics, a division of Parker Hannifin Corporation ? phone
781-939-4726
? mobile 781-316-4864
Reply to this message
Summary created 6/10/14 at 1:12PM by Intellex Corporation
Comments welcome at: feedback@intellexcorp.com