 |

Tag List | Content Insertion | Expression | Looping | Branching | System
Values | Statistical Functions | Sections

Content Insertion [ Learn ]
<?[Field]?>
<?[Field]{Column}?>
<?[LookupValueField]([LookupKeyField]=[Field])?>
<?[LookupValueField]([LookupKeyField]=[Field]{Column})?>
* A result number format may be specified, before "?>", like <?[LVField]([LKField]=[Field]{Column})@NumFormat?>.
Arithmetic Expression [ Learn ]
<?(Expression)?>
<?(Expression)@NumFormat?>
Looping [ Learn ]
<?Loop:Count?>
<?Exit?>
<?EndLoop?>
Branching: IF [ Learn ]
<?If(Expression ComparisonOperator CheckValue)?>
<?If(Expression = CheckValue1; CheckValue2; ...)?>
<?If(Expression = FromValue .. ToValue)?>
<?If(Same[Field])?>
<?If(Same[Field]{Column})?>
<?Else?>
<?EndIf?>
* The comparison operator is one of these:
=, >, <, <>, >=, <=,
or ?=.
Branching: CASE [ Learn ]
<?StartCase?>
<?Case(Expression ComparisonOperator CheckValue)?>
<?Case(Expression = CheckValue1; CheckValue2; ...)?>
<?Case(Expression = FromValue .. ToValue)?>
<?Case()?>
<?EndCase?>
* The comparison operator is one of these:
=, >, <, <>, >=, <=,
or ?=.
System Values: Date Time [ Learn ]
<?YearNum?>
<?MonthNum?>
<?DayNum?>
<?DateYMD?>
<?DateLong?>
<?DateAbbr?>
<?TimeHMS?>
System Values: Page [ Learn ]
<?PrevPage?>
<?NextPage?>
<?PageNum?>
Statistical Functions [ Learn ]
<?SCNT([ValueField],[FrequencyField])?>
<?SSUM([ValueField],[FrequencyField])?>
<?SAVG([ValueField],[FrequencyField])?>
<?SSDS([ValueField],[FrequencyField])?>
<?SSDP([ValueField],[FrequencyField])?>
<?SMAX([ValueField])?>
<?SMIN([ValueField])?>
<?LRCT([InputFieldX],[ResponseFieldY])?>
<?LRRC([InputFieldX],[ResponseFieldY])?>
<?LRCC([InputFieldX],[ResponseFieldY])?>
* A result number format may be specified, before "?>", like <?SAVG([ValueField],[FrequencyField])@NumFormat?>.
Sections: Variables [ Learn ]
<?Vr:vName?> ... <?/Vr?>
<?vName?>
<?vName@NumFormat?>
Sections: Hide [ Learn ]
<?Hd?> ... <?/Hd?>
Sections: Speech [ Learn ]
<?Sp?> ... <?/Sp?>
<?Sp-?> ... <?/Sp?>
<?Pause:count?>
Sections: Email [ Learn ]
<?EmFrom?> ... <?/Em?>
<?EmTo?> ... <?/Em?>
<?EmCC?> ... <?/Em?>
<?EmBCC?> ... <?/Em?>
<?EmSubj?> ... <?/Em?>
<?EmHTML?> ... <?/Em?>
<?EmText?> ... <?/Em?>

Syntax and Usage Notes
1. |
General |
|
a) |
The words in blue above
are user-specified objects. |
|
b) |
All tag keywords are case
INsensitive. |
|
c) |
The Count attribute
in the <?Loop:Count?> tag is optional. If it
is not specified, the colon may also be
skipped. Without the attribute, loop break is controlled by data stream breaks,
and by the <?Exit?> tag if used. |
|
d) |
The [FrequencyField] in
statistical function tags is optional. If it is not specified,
the comma may
also be skipped. Without the frequency field, the frequency of each value is
assumed to be 1. |
|
e) |
Mergemill reports template
errors only where control structures and tag pairs are incorrectly
used. Tags not recognized are treated as static template text.
 |
2. |
Field and variable naming
rules |
|
a) |
The names are case SENSITIVE. |
|
b) |
They must not begin with
a number, a symbol, or the letters "xml" in any combination
of upper or lower case. |
|
c) |
Don't include |
|
|
i) |
whitespaces |
|
|
ii) |
comparison operators (=, >, <, <>, >=, <=,
?=) |
|
|
iii) |
arithmetic operators (+,
-, *, /, \, %, ^) |
|
|
iv) |
other reserved symbols ([,
], (, ), {, }, @, .., #, :, ;, ", and the comma)
 |
3. |
Whitespaces |
|
a) |
Each stretch of reserved
keywords and symbols, shown in black in the tags above, must not
be broken by whitespaces. Taking "<?LRCC([InputFieldX],[ResponseFieldY])@NumFormat?>" as an example, there must NOT be whitespaces in the parts shown in bold. |
|
b) |
Whitespaces immediately
before and after user-specified objects are allowed and ignored.
These objects are: |
|
|
i) |
Field name, field attribute, column
number, variable name, and number format specification |
|
|
ii) |
Expression operand, operator, and
check value |
|
|
iii) |
The Loop attribute count
 |
4. |
IF, CASE, and LOOP structures |
|
a) |
"<>" means
not-equal-to, and "?=" is
the contains comparison operator. Example:
<?If([field]
?= mob)?>Field value could be "automobile"<?EndIf?> |
|
b) |
If there is no ELSE part
in an IF structure, you may skip it:
<?If(...)?> ... <?EndIf?> |
|
c) |
The case else tag <?Case()?> is
optional. It is always true and, if included, must be the last
CASE in the structure. |
|
d) |
Nesting of control structures |
|
|
i) |
LOOPs must not be nested. The following
is therefore NOT allowed:
<?Loop?>
... <?Loop:20?> ... <?EndLoop?> ... <?EndLoop?> |
|
|
ii) |
Multi-level nesting of IF and CASE
structures are allowed:
<?If(...)?>
... <?StartCase?> ... <?EndCase?> ... <?Else?>
... <?EndIf?>
<?StartCase?><?Case(...)?>
... <?If(...)?> ... <?EndIf?> ... <?Case()?>
... <?EndCase?>
<?If(...)?>
... <?If(...)?> ... <?Else?> ... <?EndIf?> ... <?Else?>
... <?EndIf?>
<?StartCase?>
... <?Case(...)?> ... <?StartCase?> ... <?EndCase?> ... <?Case()?>
... <?EndCase?> |
|
|
iii) |
IF, CASE, and LOOP structures may
be nested within each other:
<?Loop?>
... <?If(...)?> ... <?Else?> ... <?EndIf?> ... <?EndLoop?>
<?StartCase?>
... <?Case(...)?>
... <?Loop?> ... <?EndLoop?> ... <?EndCase?>
 |
5. |
Use
of double-quotes in check values inside the IF and CASE
tags |
|
a) |
Add quotes if the leading
and trailing whitespaces in a check value are significant, such
as " words". |
|
b) |
Add quotes if
a check value contains the double-dot or semicolon,
such as "monday... friday; sunday" or "monday;
tuesday; wednesday". |
|
c) |
A check value may be a
number, a string of characters, a variable name, or a reserved
word representing a Mergemill system value such as PageNum.
If the string of characters you want to test happens to be a variable
name or a reserved word, put
it between quotes to specify it as ordinary
text. |
|
d) |
If a check value contains
double-quote characters, it must be enclosed in double-quotes,
and the embedded double-quotes must each be represented by a pair
of consecutive double-quotes, such as "the name is ""test""".
 |
6. |
Additional options if
the comparison operator in an IF or CASE tag is "=" |
|
a) |
You may check for a single
value, a value in a range, or a value in a list. |
|
b) |
When checking for a value
in a range: |
|
|
i) |
The separator between the two boundary
values is a double-dot, i.e. two consecutive dots. |
|
|
ii) |
Boundary values are included in the
range. |
|
|
iii) |
The from value may be bigger
than the to value.
 |
7. |
Sections |
|
a) |
Everything except content-insertion
field tags are ignored in a hide section (<?Hd?> ... <?/Hd?>). |
|
b) |
Sections, such as <?Vr:vMyVariable?> ... <?/Vr?>,
may be embedded within a control structure. |
|
c) |
Control structures may
be used inside a section:
<?Sp?><?If(...)?>Speak
this<?Else?>Speak that<?EndIf?><?/Sp?> |
|
d) |
Similar sections must
NOT be nested:
<?Sp?>...<?Sp-?>...<?/Sp?><?/Sp?>
<?EmFrom?>...<?EmTo?>...<?/Em?><?/Em?> |
|
e) |
Any section type
may be embedded within other types:
<?EmTo?><?Loop?>...<?EndLoop?><?Sp?>Finish
building recipient list<?/Sp?><?/Em?> |

[ Top of Page ]
Tag List | Content
Insertion | Expression | Looping | Branching | System
Values | Statistical Functions | Sections
 |
 |