Views:

Formula Lookup Overview


Formula lookups allow you to extend the simple AD lookup functions by using a C# script to manipulate the data and returning a string.

To create a new formula lookup, click on Admin > Fields on the left hand side menu > Click on the CREATE NEW link.

Select Formula from the drop down options > select Continue






In the above example, we have created a lookup called MobileAndDescription

Many of us are not sure whether our details such as Mobile Number, Fax Number, Landline Number etc. are up-to-date in the Active Directory (AD).

If we add a lookup, say (!mobile!) to our signature and the 'Mobile' field is empty in the AD, it will just leave a blank space in your signature configuration.

To overcome that problem we have created this lookup. This lookup will search the AD for your Mobile Number. If it finds an entry it will populate the mobile number and put a label 'Mobile: ' in front of it.

If it finds the field empty, then it will return an empty string. So, your signature will not have empty spaces.
 

Lookup Name

It is important to provide a unique name to the lookup configuration as it will appear in the list of available lookups while creating the signature or signature block configuration.
 

Formula (C#)

This is the place where you will write your C# script. The script will be executed at run time.

The formula is parsed in the same way as lookups are in the body of the signature.



In the above example the (!mobile!) look-up will be calculated and the results will be inserted between the quotes to generate a string.

This text is then used in the formula to determine if the phone number and description should be inserted into the signature.


Your Crossware Mail Signature Configuration Database, already contains the above lookup including similar lookups for Fax and Phone Number.

Related Products: CMS MSE v5