LIMIT Command

A LIMIT command is used to conditionally include or exclude the document section to which it is attached. LIMIT commands resolve to "true" or "false." If an object is found that meets the specified conditions, the command is "true," and the document section is included in the document. If an object is not found, the command is "false," and the section is not included in the document. For example, suppose you have a repeated section for each file in a directory. You may want to include a special section if a file has a ".DAT" extension.

Each LIMIT command is based on the context of one of the OPEN, REPEAT, or LIMIT commands defined above it in the command hierarchy. At least one OPEN command must be specified in a document before a LIMIT command can be created.

See also the section on Special LIMIT Commands.

Adding a New LIMIT Command

1. To add a LIMIT command:placeholder text, you can select the text.

If you work in the document, show the existing SoDA commands so you can be sure the cursor position is correct.

2. Choose Add Command from the SoDA menu.

3. Select the LIMIT Command. If the command is not available, click Cancel and be sure text is selected in your document.

4. In the LIMIT Command dialog box, choose an object. Then limit the object either by class or by an And Where expression.

To modify an existing LIMIT command, refer to: Modifying Existing Commands

Note: To read about the annotation differences between the Word versions, see Word 2000 and Word 2002 Comparison.

Example

You are creating a document which will extract objects from the File System domain. You would like SoDA to create a document section for each directory object (directory, file) in your project directory. You would like one particular subsection to be created, however, only if the directory object is a file.

After creating an OPEN command called project_directory, and a REPEAT command called all_dir_objects for each directory object in project_directory, create a LIMIT command that will only create a section if a file is found.

Select Object all_dir_objects -> <Self>

Where Is A File

LIMIT Commands Refined with And Where

The And Where expression specifies criteria which must be met by the object examined by a LIMIT command. If the criteria are not met by the object, that LIMIT command will be "false".

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 LIMIT 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.

Example

You are creating a document which will extract objects from the File System domain. You would like SoDA to create a document section for each directory object (directory, file) in your project directory. You would like one particular subsection to be created, however, only if the directory object is a file that starts with "ROSE".

After creating an OPEN command called project_directory, and a REPEAT command called all_dir_objects for each directory object in project_directory, create the following LIMIT command:

Select Object all_dir_objects -> Self

Where Is A File

And Where SimpleName LIKE ROSE