<< Click to Display Table of Contents >> Navigation: General Functions > Configuring the MIE (Programmer's Guide) > Portal Design > Request Portal Design (Programmer's Guide) > Template Construction > STEP<n>-LOOKUP<m> |
The {%STEP<n>-LOOKUP<m>%} tag is used to define how an area will be rendered based on a lookup. The lookup is performed via an MIE call-back, using the value of a current DOM variable as the key to perform the lookup. The lookup may return up to 8 resulting variables, which may then be inserted into the HTML defined in the {%STEP<n>-LOOKUP<m>%} tag. Once the lookup has finished and the HTML rendered, the entire result is then inserted in the {%STEP<n>-AREA<m>%} tag where the corresponding placeholder tag has been defined. The process works as follows:
Step 1 - perform the lookup by using an MIE call-back
Step 2 - render HTML by inserting the returned variable(s) and expanding other merge and general tags. The HTML rendered is the HTML defined in the {%STEP<n>-LOOKUP<m>%} tag.
Step 3 - insert the rendered HTML in place of the placeholder tag in the corresponding area.
The syntax is as follows:
{%STEP1-LOOKUP1~~
LU=<cfNo for lookup>,[<DOM variable to use as key value>] | V1=[cfNo1],V2=[cfNo2],V3=[cfno3],...,V8=[cfNo8]
^^
<html to render for lookup>
%}
Where:
<cfNo for lookup> is the cfNo (the number displayed when viewing Remote Data Management - Database - Fields) of the table.column combination to be used to perform the lookup
<DOM variable to use as key value> = document object model variable whose value will be taken and then used to perform the lookup into the table specified by <cfNo for lookup>. This is an optional value as the key value may be sent by the call-back, in which case it will be used instead of using the value of a DOM variable.
[cfNo1] through [cfNo8] - the cfNo to be used to return a value based on the lookup. Once a record is located using the lookup, then up to 8 columns from the record can be used to be inserted into the lookup HTML. The values in the columns from the looked-up record will be assigned to their specific variables, V1 through V8, and can be referenced in the look-up HTML using the general tags [%V1%] through [%V8%]
There are some special cases where a pre-defined case is specified instead of [cfNo1 through 8].
Example:
{%STEP3-LOOKUP1~~
LU=3331,SRPMSLAvailable550|V1=MSLFAMILY,V2=MSLPRICE
^^
<table align="left" border="0" cellspacing="0" cellpadding="0" width="70%">
<tr>
<td align="right" style="width:30%" valign="top">
<font class="PrintHeader6Text">Family:</font>
</td>
<td align="right" style="width:3px" valign="top"> </td>
<td align="left" style="width:70%" valign="top">
<font class="PrintBody3Text">[%V1%]</font>
</td>
</tr>
<tr>
<td align="right" style="width:30%" valign="top">
<font class="PrintHeader6Text">Price:</font>
</td>
<td align="right" style="width:3px" valign="top"> </td>
<td align="left" style="width:70%" valign="top">
<font class="PrintBody3Text">[%V2%]</font>
</td>
</tr>
</table>
%}