Formula Field Overview
Formula fields 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 field, click on Fields on the left-hand side menu > Click on the FORMULA tab > Click on the Create formula field.
In the above example, we have created a field 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 directory.
If we add a field, say (!mobile!) to our signature and the 'Mobile' field is empty in the directory, it will just leave a blank space in your signature configuration.
To overcome that problem, we have created this field. This field will search the directory 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.
For details on using built-in fields click here How do I configure lookups to add a description, how do I add a new line to a formula lookup
Field Name
It is important to provide a unique name to the field configuration as it will appear in the list of available fields 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 fields are in the body of the signature.
In the above example, the (!mobile!) field 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 tenant already contains the above field, including similar fields for Fax and Phone Number.