Conditional Substitution
In some cases, substitution variables do not apply to all situations. For example, %VMCONSOLEURL% applies only to VMware-based systems. If sends an email about a Hyper-V system, the email would list the field for VM Console URL with a blank value. If emails contain blank fields, they can be confusing and unattractive.
casa
In some cases, substitution variables do not apply to all situations. For example, %VMCONSOLEURL% applies only to VMware-based systems. If
Server Automation
sends an email about a Hyper-V system, the email would list the field for VM Console URL with a blank value. If emails contain blank fields, they can be confusing and unattractive.To eliminate blank fields, surround variables with an "at" sign (@) in the stack, for example:
@%VMCONSOLEURL%@
The following example shows how to code the example 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>
The variable must occupy the same line as the text associated with it. Consequently, the following example would not eliminate the bank field:
<td>VM Console URL</td><td>@%VMCONSOLEURL%@</td>