How to create a Dynamic variable for Pager Field in AD
Create a dynamic variable based on information obtained from a user account in Active Directory.
It may be desirable to obtain specific information from the user account in AD in order to create a dynamic variable and subsequently to use that variable in an element being run by the main engine of the script.
This article illustrates how to create a dynamic variable which will resolve to the data that is contained in the Pager field of a user account in Active Directory.
The variable must first be defined in either a global definitions file (illustrated below) or a profile specific definitions file (select profile ->definitions tab) in order to be processed for use during the execution of the main engine.
Example of a global definitions file entry to create a variable named $adPager
Syntax from screenshot above:
$slADCurrentUser = GetObject($LDAP)
If not @error
$adPager = $slADCurrentUser.pager
Once the variable has been defined in a definitions file, it can be used in any element because the definitions file is always processed prior to elements in the main engine. To test to see if the variable resolves properly, create a message box element to validate for the test user and simply enter the newly created variable in the body of the message box similar to the following:
This is my pager number $adPager
Note: The creation and use of dynamic variables is considered to be custom scripting and is therefore not supported. This article was created as a service to our customers to demonstrate the extensibility of the product for those who are inclined to create their own custom variables.