<activeRecord>
(Record Currently Displayed In Merged Document)
This element specifies that the hosting application shall display the given record from the specified external data source in place of the MERGEFIELD
fields (§2.16.5.42) its data is mapped to via the <fieldMapData>
element (§2.14.15) in a merged document. When this element is present, the @val
attribute shall specify the one-based index of the record from that data source which shall be used to populate this document.
If the <activeRecord>
element is omitted with the <viewMergedData>
element's @val
attribute equal to true, the hosting application shall behave as if the <activeRecord>
element's @val
attribute was equal to 1. If the <viewMergedData>
element (§2.14.36) is omitted or present with a @val
attribute equal to Off, 0, or false, then this element shall be ignored. If the <activeRecord>
record is given a @val
attribute that is less than one or greater than the number of records in the specified external data source, the hosting application shall treat this @val
attribute as if it were equal to 1.
This table below illustrates the necessary WordprocessingML to display applicable data from the specified external data source within the merged document where fields have been inserted:
<w:viewMergedData val="off"/> |
<w:viewMergedData val="on" /> <w:activeRecord w:val="1" /> |
<w:viewMergedData val="on" /> <w:activeRecord w:val="2" /> |
Dear {MERGEFIELD "Courtesy Title" \m} {MERGEFIELD "Last Name" \m}, Sample letter text. Sample letter text. Sample letter text. Sample letter text. Sample letter text. Sample letter text. Sample letter text. Sincerely, |
Dear Mr. Doe: Sample letter text. Sample letter text. Sample letter text. Sample letter text. Sample letter text. Sample letter text. Sample letter text. Sincerely, |
Dear Ms. Smith: Sample letter text. Sample letter text. Sample letter text. Sample letter text. Sample letter text. Sample letter text. Sample letter text. Sincerely, |
<w:viewMergedData /> <w:activeRecord w:val="2" />
The <activeRecord>
element is present and has a @val
attribute equal to 2
, therefore this WordprocessingML specifies that a conforming hosting application shall display data from the second record of the specified external data source in place of fields its data is mapped to within the merged document. ]
Parent Elements |
---|
|
Attributes |
Description |
---|---|
|
Specifies that the contents of this attribute will contain a decimal number. The contents of this decimal number are interpreted based on the context of the parent XML element. <w:… w:val="1512645511" /> The value of the The possible values for this attribute are defined by the ST_DecimalNumber simple type (§2.18.16). |
The following XML Schema fragment defines the contents of this element:
<complexType name="CT_DecimalNumber">
<attribute name="val" type="ST_DecimalNumber" use="required"/>
</complexType>