You use the REPEAT command to create sections in your Web page for each object found in the source. For example, you might use a REPEAT command to generate a section for each file in a directory.
Each REPEAT command is based on the context of one of the OPEN, REPEAT, or LIMIT commands defined above it in the command hierarchy. You must have at least one OPEN command in the template before you can add a REPEAT command.
To add a REPEAT command:
1. Do one of the following:
- In the Template View, select the command below which you want the REPEAT command to appear, and click the REPEAT button in the tool bar.
- In the template itself, position the insertion point where you want to insert the command, click ProjectConsole > Add Command, select REPEAT Command and click OK.
Note: Show the existing Template Builder commands so you can be sure the insertion point is in the correct position. If a section placeholder already exists, you can select the section.
2. In the REPEAT Command dialog box, select the object to repeat, modify any options, and click OK.
To modify an existing REPEAT command, refer to Modifying Existing Commands
Note: To read about the comment differences between the Word versions, see Word 2000 and Word 2002 Comparison.
You can use a REPEAT command to produce one table row for each object you specify.
Follow these steps:
1. Choose Insert Table from the Table menu. Select the number of columns you need and the format you want. If you want the table to have a heading row, create a 2-row table; otherwise create a 1-row table.
2. Make any required format changes to the borders and shading. It is important to determine this information before Web page generation – once you generate the Web page you cannot change the table style.
3. If used, enter the headings in the heading row.
4. Select the second row of the table (or the single row of a 1-row table). Be sure to select only the row and not any additional text beyond the table.
5. Click ProjectConsole > Add Command and follow the steps for inserting a standard REPEAT command.
6. Add DISPLAY commands in the table cells as needed.
You can also nest a REPEAT command in a single table cell. To do so, follow the steps for inserting a standard REPEAT command.
The And Where expression specifies criteria that must be met by items in the set of objects that is returned by a REPEAT command. If the criteria are not met by a particular object, that object will not become part of the set.
Expressions consist of operands and operators. Operands are the attributes or literals on either side of an operator. The operands that are available at a given time in the REPEAT command dialog box depend upon the information source domain specified in the current context. Operators specify the test that will be applied to the operands to determine their relationship, for example, the test of equality or the test of inequality.
Here are the operators available for And Where expressions. Note that all of the operators are case sensitive.
|
= |
exactly equal to |
|
!= |
not equal to |
|
> |
greater than |
|
>= |
greater than or equal to |
|
< |
less than |
|
<= |
less than or equal to |
|
LIKE |
matches the expression (can include metacharacters) |
|
NOT LIKE |
does not match the expression (can include metacharacters) |
|
IS |
the class of the object matches |
When a DISPLAY value returns a Boolean value, "True" or "False", you must enter these values exactly.
Note: Operands that are literals always evaluate to a string value. Therefore, numeric values are not considered to be numbers, but rather strings. What is the effect? If you filter based on a numeric value, you may get results that you don’t expect. For example: if you filter for an operand greater than "42", you may get 43 through 99, but you won’t get 100 or beyond. This is because the "1" in "100" is considered to be less than the "4" in "42". Again, operands are evaluated based on string representations, not numeric representations.
Ordering specifies one or more attributes by which the objects resulting from the REPEAT command will be sorted. Sorting can take place alphanumerically or numerically, in forward or reverse order, and case can be ignored. (Note that numeric sorts are for pure numbers only. If the number contains punctuation (for example, a comma or a period (decimal point)) then the number is considered a string and the results will reflect the sort as a string.)
You can define REPEAT commands to be recursive so that with only one recursive REPEAT command you can drill down through an artifact structure and extract all of the information you need.