Logic – Program Flow

With the logic tab you can add IF-THEN and IF-THEN-ELSE statements to your templates.

Like this you can compare the content of either system variables like the table name or one of your own user variables with a predefined comparison value.

Inside the IF-part or optional ELSE-part you can enter additional code including code snippets and depending on the comparison outcome the code will be generated.


Say you want to check if your table name contains the word “system” and if it does, you want to add some additional code.

In this case you would add the following code snippet:

<<if>> — here comes you extra code — <<endif>>

The code snippet can be easy created with the logic tab as seen below.

Add program logic to your template
  • Code: choose between an IF-THEN or IF-THEN-ELSE statement
  • Variables: choose if you want to compare the value of a system variable or a user variable and select the variable you want to use.
  • Operators: choose how the comparison should be done. You have five options. 1. Equals: checks if the content of the variable exactly matches the comparison value. 2. Not equals: checks if it does not match. 3. Starts With: checks if the variable starts with the comparison value. 4. Ends With: checks if the variabel ends with the comparison value. 5. Contains: checks if the comparison value exists somewhere inside the variable’s content.
  • Value: comparison value that will be compared with the variable content.
  • Logic Code Snippet: preview of the snippet that would be created.

By pressing the add button, the code snippet will be added at the cursor location of your template.