How to create a Dynamic Variable for Other Website Field in AD (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 Other Web page field of a user account in Active Directory.
Create a dynamic variable based on information obtained from a user account in Active Directory.
Example of a global definitions file entry to create a variable named $adOtherHomePage
Syntax from screenshot above:
$slADCurrentUser = GetObject($LDAP)
If not @error
$adOtherHomePage = $slADCurrentUser.url
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:
My secondary website is $adOtherHomePage
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.