Examples of using special variables to access the runtime hierarchy
The TravelDocs application used special variables to access data in the runtime hierarchy. You can also use the ExportXML ruleset.
The @BatchID example and the @ID example
describe how to access data in the following sample runtime batch
hierarchy XML from the ExportXML ruleset or with special variables.
<B id="20110003.001">
<V n="TYPE">TravelDocs</V>
<D id="2011003.001.01">
<V m="TYPE">Car_Rental</V>
<P id="TM000001">
etc.Use @BatchID to get the current batch ID
xml_SetFileName("@BatchID") returns xml_SetFileName("20110003.001")
Use @ID to get the ID of the current page
xml_NewNode("@ID,Rental_Agreements") returns xml_NewNode("@TM000001,Rental_Agreements") .
Use @P\<field_name> to get the value of a field on the current page
The @P variable
retrieves the value of a field on a current page, as shown in this
sample runtime page data XML file.
<P id=TM00001>
<F id="Pickup_Date">
<V n="TYPE">Pickup_Date</V>
<V n="Position">179,384,543,462</V>
<V n="STATUS">0</V>
<C cn="7" cr="200,416,220,430>84</C> <!-- T -->
<C cn="10" cr="226,425,240,440>117</C> <!-- u -->
<C cn="10" cr="245,425,258,440>101</C> <!-- e -->
<C cn="10" cr="260,425,270,440>115</C> <!-- s -->
<C cn="10" cr="273,435,278,444>44</C> <!-- , -->
<C cn="10" cr="336,419,337,440>32</C> <!-- -->
<C cn="10" cr="290,419,306,440>68</C> <!-- D -->
<C cn="10" cr="310,425,324,440>101</C> <!-- e -->
<C cn="10" cr="325,425,336,440>99</C> <!-- c -->
<C cn="10" cr="370,419,371,444>32</C> <!-- -->
<C cn="10" cr="349,419,363,440>55</C> <!-- 7 -->
<C cn="10" cr="365,435,370,444>44</C> <!-- , -->
<C cn="10" cr="445,419,446,440>32</C> <!-- -->
<C cn="10" cr="381,419,395,440>50</C> <!-- 2 -->
<C cn="10" cr="396,419,411,440>48</C> <!-- 0 -->
<C cn="10" cr="415,419,428,440>49</C> <!-- 1 -->
<C cn="10" cr="430,419,445,440>48</C> <!-- 0 -->Using
the sample XML, xml_SetModeValue("Pickup_Date,@P\Pickup_Date") results
in xml_SetModeValue("Pickup_Date,Tues, Dec 7, 2010").