Andrew Donnan
posted this on November 25, 2008 13:23
Used to display the "many" records associated to a single record in a relationship set up by a foreignkey tag.
Attribute
Tip
UPDATE - rlid attribute in 7.0.3 and IAP
Users are asking about the
rlid attribute used in the IAP and available in 7.0.3. It is necessary to
effectively use relatedlists in some cases.
If a relatedlist is repeated
within an eocrepeatallrecords tag and not contained by a second tag, we need to
use rlid.
rlid attributes are given to relatedlists to avoid repetition in
where a relatedlist is used twice in one view.
There is no set rlid value for
a relatedlist. The rlid value for a particulr relatedlist does not have to be
the same in all views it appears in.
The rlid is strictly a user defined,
unique identifier for a relatedlist in a particular view.
Here is an
example of rlid use:
<eocrepeatallrecords>
<h1>Display ICS 203 Personnel Information</h1>
The branches are as follows:
<relatedlist table="ICS 203 Branch Table" rlid="1">
<relatedlist table="ICS 204 Division Table">
Display Division info
</relatedlist>
</relatedlist>
<h1>Display ICS 207 Org Chart</h1>
The org chart is as follows:
<relatedlist table="ICS 203 Branch Table" rlid="2">
<relatedlist table="ICS 204 Division Table">
Display Division info
</relatedlist>
</relatedlist>
</eocrepeatallrecords>
Note that the only use of rlid is for the repeated table "ICS 203
Branch Table".
Repetition occurs when:
1) A relatedlist is repeated
inside an eocrepeatall records tag
AND
2) The relatedlist is not enclosed
in a parent relatedlist.
To illustrate (2), look at the user of ICS 204
Division Table. It is repeated within the overall scope of the
eocrepeatallrecords tag.
However, each of the 204 relatedlists is contained
in a 203 relatedlist. They don't 'see' each other so there is no
repetition.
Similarly, the ICS 203 relatedlists are in the
eocrepeatallrecords tag and not contained in anything else. Therefore, we need
the rlid attributes to avoid repetition.