Custom Key Segment Loop Expressions

 

CodeGen supports custom conditional expressions in key segment loops via the <IF CUSTOM_expression> template_code </IF> and <IF NOT_CUSTOM_expression> template_code </IF> tags. Custom key segment loop expressions test the presence or absence of some piece of text in a key segments associated fields user text or long description.

 

There are two types of custom field loop expressions.

Multi-Line Custom Key Segment Loop Expressions

Multi-line custom key segment loop expressions occur when the opening and closing conditional tags appear on separate lines in a template file, and delimit one or more entire lines of template code, like this:

<SEGMENT_LOOP>
[code]
<IF CUSTOM_expression>
conditional code
[<ELSE>
conditional code]
</IF[ CUSTOM_expression]>
[code]
</SEGMENT_LOOP>

Multi-line custom key segment loop expressions cause one or more lines of output code to be included or excluded, based on the evaluation of the expression.

In-Line Custom Key Segment Loop Expressions

In-line custom key segment loop expressions occur when the opening and closing conditional tags appear on the same line in a template file, and delimit part of a line of template code, like this:

<SEGMENT_LOOP>
[code]
[code] <IF CUSTOM_expression> conditional code </IF[ CUSTOM_expression]> [code]
[code]
</SEGMENT_LOOP>

In-line custom key segment loop expressions cause part of an output line to be included or excluded based on the evaluation of the expression.

Nested Expressions

Multi-line expressions may be nested within one another, and in-line expressions may be nested within multi-line expressions. However, in-line expressions may not be nested inside one another.

 

 

 


Copyright © 2018  Synergex International, Inc.