Gen IT supports the use of ‘Include Statements’. Include Statements allow for the inclusion of a single line, or a separate template within another  template. The decision on whether to include the Include Statement is based on a variable lookup at run-time.


Compound and Include statement processing must be enabled within the project settings. The order of processing is also defined here.


Include Statements are added to the templates in the format <%AAA,BBB%>. The Include Statement must be an exclusive entry within a template cell.


The include statement definition is prefixed and suffixed by predefined characters. The Compound Template Variable Delimiter entries in the spreadsheet settings file indicate what characters to use as the include statement prefix & suffix.


IncludeLines statements also support an ELSE option.


The general format of the include statement statement is as below:


<%AAA,BBB%>


or


<%AAA%>


or


<%AAA,<Function>%>


AAA :

The name of the template to be included, formatted as ‘T:<Template_name>‘

The text to be included, formatted as ‘“Text to Include”‘

‘IncludeLines:2′ or ‘IncludeLines:End’


BBB – The variable used to determine the include status, formatted as a variable <<Variable>>. A variable look-up is done to determine this value, which can be either 0 or 1+, or ‘DN<=>XXX‘ where XXX matches all or part of the selected Device Name. This allows for text to be included based on the device name.


Function – A comparison function between a variable and some text or numbers. This allows for text to be included based on a function.


Example 1:


<%T:Template_Name,<<VariabletoCheck>>%>


T:Template_Name – Compound Template Name to be included. (%Template_Name% in versions pre 2.2)

<<VariableToCheck>> – The variable to check. 0 = Exclude, 1+ = Include


Example 2 :


<%T:Template_Name,DN~=”Text”%>


T:Template_Name - Compound Template Name to be included. (%Template_Name% in versions pre 2.2)

DN~=”Text” - Check if the Device Name includes or is equal to ‘Text’.


Example 3 :


<%T:Template_Name,<<VariabletoCheck>>=~”Text”%>


T:Template_Name - Compound Template Name to be included. (%Template_Name% in versions pre 2.2)

<<VariableToCheck>> – The variable to check.

”Text” - Check if the variable includes or is equal to ‘Text’.


Example 4 :


<%T:Template_Name,<<VariabletoCheck>>~=”Text”%>


T:Template_Name - Compound Template Name to be included. (%Template_Name% in versions pre 2.2)

<<VariableToCheck>> – The variable to check.

”Text” -  Check if the 'Text' includes or is equal to the variable.


Example 5 :


<%T:Template_Name,<<VariableToCheck>>==”Text”%>


T:Template_Name - Compound Template Name to be included. (%Template_Name% in versions pre 2.2)

<<VariabletoCheck>>==”Text” - Check if the variable is equal to ‘Text’.


Example 6 :


<%T:Template_Name%>


T:Template_Name - Compound Template Name to be included. (%Template_Name% in versions pre 2.2)


Example 7:


<%”Text to include….<<Variable>>”,<<VariabletoCheck>>%>


“Text to include…<<Variable>>” – Text to include

<<VariableToCheck>> – The variable to check. 0 = Exclude, 1+ = Include


Example 8 :


<%”Text to include….<<Variable>>”,DN!=”Text”%>


“Text to include…<<Variable>>” – Text to include.

DN<~=”Text” – Check if the Device Name includes or is equal to ‘Text’.


Example 9 :


<%”Text to include….<<Variable>>”,<<VariableToCheck>>==”Text”%>


“Text to include…<<Variable>>” - Text to include.

<<VariabletoCheck>>==”Text” - Check if the variable is equal to ‘Text’.


Example 10 :


<%IncludeLines:3,<<VariableToCheck>>==”Text”%>

<%IncludeLines:END%>


3 - The number of lines to include.

<<VariabletoCheck>>==”Text” - Check if the variable is equal to ‘Text’.

END - End IncludeLines before line count is reached if the Identifier is matched.


Example 11 :


<%IncludeLines:A123,<<VariableToCheck>>==”Text”%>

<%IncludeLines:A123:END%>


A123 - The include lines identifier. Delimiters can now be up to 50 characters long. They must start with a alpha character and can include A-Z, a-z, 0-9, and _-()+

<<VariabletoCheck>>==”Text” - Check if the variable is equal to ‘Text’.

END - End IncludeLines before line count is reached if the Identifier is matched.


Example 12 :


<%IncludeLines:A123,<<VariableToCheck>>==”Text”%>

<%IncludeLines:A123:ELSE%>

<%IncludeLines:A123:END%>


A123 - The include lines identifier. Delimiters can now be up to 50 characters long. They must start with a alpha character and can include A-Z, a-z, 0-9, and _-()+

<<VariabletoCheck>>==”Text” - Check if the variable is equal to ‘Text’.

ELSE - Include the next block if the initial match is matched or not matched.

END - End IncludeLines before line count is reached if the Identifier is matched.





Please have a look at the example files provided as part of the installation as these show practical use of the available features.