Previous Topic: Email Types and Categories

Next Topic: Enable or Disable Inheritance of Resources from the Public Org Unit


Conditional Substitution

In some cases, substitution variables do not apply to all situations. For example, %VMCONSOLEURL% applies only to VMware-based systems. If Reservation Manager sends an e-mail about a Hyper-V system, the e-mail would list the field for VM Console URL but with a blank value. If emails contain blank fields, they can be confusing and unattractive.

You can eliminate blank fields by surrounding variables with ampersands (@) in the template, for example:

@%VMCONSOLEURL%@

The following example shows how to code it in the template:

<table border=1>
<td>System Name</td> <td>%SERVER%</td>
<td>IP Address</td> <td>%IPADDRESSES%</td>
<td>VM Console URL</td> <td>@%VMCONSOLEURL%@</td>
</table>

Note: The variable must be on the same line as the text associated with it. The following example would not eliminate the bank field:

<td>VM Console URL</td> 
<td>@%VMCONSOLEURL%@</td>