Description of LDAP DisplayStrings

Last modified by Admin on 2024/08/08 21:19

Introduction

During all number resolutions the resulting display name is built out of different LDAP fields. These display strings can be altered according to the customer's requirements. The display strings are located in the Registry in "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\3iMedia\Metaservices for SwyxWare\Config\LDAPNodes". For each LDAP node a corresponding registry key exists with a REG_SZ value LDAPDisplayString.

It's so possible to change the display string for different search results independently.

Display String In Detail

The easiest way to edit and understand the display string syntax is by copying the registry value into a text editor and split the string by the semicolon. The default display string will then look like this:

"%sn!', '%%givenname!%%' ('company')'%%' 'streetaddress%%' 'postalcode' -'%%' 'l%%' 'country%%' ('city')'%";
"%displayname!%%' ('company!')'%%' 'streetaddress%%' 'postalcode' -'%%' 'l%%' 'country%%' ('city')'%";
"%company!%%' ('department')'%%' 'streetaddress%%' 'postalcode' -'%%' 'l%%' 'country%%' ('city')'%";
"%displayname!%%' 'streetaddress%%' 'postalcode' -'%%' 'l%%' 'country%%' ('city')'%";
"%number%%' 'country%%' ('city')'%"

 The syntax for display string consists of some special characters plus the actual LDAP field names. The following table describes the special characters in detail

CharacterDescription
"..."Each sentence has to be enclosed in double quotes. Multiple sentences have to be separated by a semicolon 
%...%Each LDAP field has to be encloses by a % at the beginning and end of the LDAP field name 
'...'Single quotes can be used to include text within an LDAP field. The content between the single quotes will not be included in the resulting string if the LDAP field is empty
!An exclamation mark right after an LDAP field marks the whole sentence as invalid if this LDAP field is empty

Example

The first sentence from the default display string will be interpreted like this:

"%sn!', '%%givenname!%%' ('company')'%%' 'streetaddress%%' 'postalcode' -'%%' 'l%%' 'country%%' ('city')'%";

Insert the LDAP field sn (surname) and add a coma plus space to the field. The coma and space will only be added if the LDAP field is not empty. The whole sentence will be skipped if this field is empty.
Insert the LDAP field givenname. The whole sentence will be skipped if this field is empty.
Insert the LDAP field company but add a space and ( at the beginning and a ) at the end.
Add the country and city evaluated from the caller number

Special Fields

There are some special fields that can be used in each display string.

FieldnameDescription
countryadds the country that's been evaluated from the caller number to the resulting display string
cityadds the city that's been evaluated from the caller number to the resulting display string
numberadds the number in canonical format to the display string

Remove The Trailing City And Country

To remote the trailing city and country information the part "%' 'country%%' ('city')'%" has to removed from each sentence.

To get a complete empty result, the country and city part have to be removed from each sentence together with the last sentence "%number%%' 'country%%' ('city')'%"

This is important if it's required that SwyxIt! has to resolve the number against it's own Plug-Ins such as Outlook.