<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
--- Jaime Perry <a class="moz-txt-link-rfc2396E" href="mailto:jaime@hoovercs.com"><jaime@hoovercs.com></a> wrote:<br>
<blockquote cite="mid20060330155123.5802B50104@diablo.celestial.com"
type="cite">
<pre wrap="">
</pre>
<blockquote type="cite">
<pre wrap="">Jeff Harrison wrote:
</pre>
<blockquote type="cite">
<pre wrap="">--- Jaime Perry <a class="moz-txt-link-rfc2396E" href="mailto:jaime@hoovercs.com"><jaime@hoovercs.com></a> wrote:
The description of what you are trying to do is
</pre>
</blockquote>
<pre wrap="">not
</pre>
<blockquote type="cite">
<pre wrap="">totally clear to me.
</pre>
</blockquote>
<pre wrap="">I know, it is not easy to explain. I retyped my
initial post quite a few
times trying to get it to make sense.
</pre>
<blockquote type="cite">
<pre wrap="">However, I believe that if you
want to use the @af in selection processing you
</pre>
</blockquote>
<pre wrap="">need
</pre>
<blockquote type="cite">
<pre wrap="">to sort on the associated field, and associate
</pre>
</blockquote>
<pre wrap="">that
</pre>
<blockquote type="cite">
<pre wrap="">sort with your output format. The easiest way to
</pre>
</blockquote>
<pre wrap="">do
</pre>
<blockquote type="cite">
<pre wrap="">that would be to just enter the associated field
</pre>
</blockquote>
<pre wrap="">name
</pre>
<blockquote type="cite">
<pre wrap="">as the primary sort on the output format.
</pre>
</blockquote>
<pre wrap="">I do have a sort built on the associated field. As
far as I can tell,
this part is working fine. My problem is
determining which instance of
a record I am processing as I process the records.
If I have a record
with 5 associated elements, that record will
(should) be in the index 5
times.
</pre>
</blockquote>
<pre wrap=""><!---->
That is true if you have all of the elements filled in
for the associated field upon which you are sorting.
</pre>
<blockquote type="cite">
<pre wrap=""> If I turn the debugger on for that record
only, the debugger
starts 5 times which is good. However, @af is
always "1" so I cannot
tell if it is the first, second, whatever time I am
hitting that
record. I would expect @af to be "1" the first time
I encounter the
record, "2" for the second, etc through the end. If
it did that, I can
just use an array and say jobnumber[@af] and be
golden.
</pre>
</blockquote>
<pre wrap=""><!---->
@af would not be "1" necessarily, the first time you
encounter the record. The @af value will correspond
to the "row number" within the associated field
grouping. For example if you had A0) as your
associated field group in your map as follows with the
following values for record #1:
Field # Group Value
1 A0) BBB
2 A0) BBB
3 A0) AAA
If you sort the output by A0) then @af will be "3" on
the first record when you are processing the "AAA"
value. This is because it is the third instance of
A0) in the map.
You should certainly not be getting "1" for all of the
values of @af, unless you are only using the first
instance of the "row" in you map.
Jeff Harrison
<a class="moz-txt-link-abbreviated" href="mailto:jeffaharrison@yahoo.com">jeffaharrison@yahoo.com</a>
Author of JHExport and JHImport. The easiest and
fastest ways to generate code for filePro exports and imports.
</pre>
<pre wrap="">
</pre>
</blockquote>
I have a few questions regarding associated fields in a report.<br>
<br>
What happens if the associated field you're trying to determine is not
the primary sort? <br>
<br>
What if there are two different associated fields in the sort? <br>
<br>
Is there a way to determine which instance is being dealt with?<br>
<br>
Thanks in advance.<br>
<br>
Boaz<br>
</body>
</html>