Using Templates

Templates allow additional field information to be added to entries that is not present on the originating extract file. For example, organisation information not included in the extract file can be added from the template to the user objects when they are created on a directory.

If desired, templates can be used to override field data from the extract file, forcing a standard value to be added to all users matching the rule, regardless of the original value on the extract file.

Templates can be used to format data as well, setting the case of field values (uppercase, properised). Also, templates can be used to populate fields with the content of other fields. The import date can also be added to a field. Finally, templates can be used to add a value to the description field of new accounts only.

Templates are thus highly useful when maintaining directory standards.

To open the template form, click on the ellipsis (...) in the Template field on the rule.

To add fixed values to fields, enter a free text value into the desired field on the template. This will populate this value on the user object on the directory where this value is missing on the entry from the extract file.

To force these template values to overwrite values from the extract file, tick the 'Force these template values to override existing mailbox data' option. The value in the template will now always be written to the user object, regardless of whether the entry from the extract file has a value or not. This will apply to all fields on the template.

To populate a field with values from other fields, placeholders can be used to indicate where a value should be inserted. These placeholders have this format: <#fieldname> where fieldname is replaced by the field name from the extract file. This placeholder will be replaced by the value of the field from the entry in the extract file during processing. Several placeholders can be used in one field. Placeholders can be mixed with free text in a field.

If a placeholder is used but that field has no value on the entry for the extract file, Directory Manager will replace it with the value in the template if one is present.

To change the case of the value inserted by the placeholder, add one of the following tags to the start of the field:

  • <caps> - will set all values to upper case (THIS IS CAPS)
  • <lower> - will set all value to lower case (this is lower case)
  • <proper> - will set all values to be proper case (This Is Proper Case)

Only one tag can be used per field and will be applied to all values inserted by placeholders. The tag will not affect free text in that field.

To add a value to the description field on new user accounts only, add <NEW> to the start of the description field.

Display and Alias Name values

The Display Name and Alias Name can be formatted in the same way. Shortcuts <f> and <l> can be used for firstname and lastname respectively.

NOTE: These name values can also be set in the User Options. Any values set in the template will override the user option.

SMTP Addresses

When creating users, Directory Manager can create an email address in a specific format for users who do not have an email address on the extract file. To use this, enter the organisation domain in the Domain field and then select the address type using the selection option. The available formats are:

  • first.last
  • initlast
  • firstlast

Users who match the rule who do not have an email address will have one created in this format.

If the domain field is left blank, no action is taken.