LDAP Queries from Get Object operator do not work in looped processes/subprocesses

Document ID : KB000005467
Last Modified Date : 14/02/2018
Show Technical Document Details
Issue:

Using the Get Object LDAP Operator within a loop produces strange results.  Post-execution code looks contains the following line:

Process.mail = Process.Get_User_1.UserAccounts[i].mail; 

So I am writing the email address to a Process level variable called Process.mail.  But after this operator executes, the result set in my operators no longer shows the field "mail" but instead the field name is the last email address from the loop run, and the value is blank.  

Cause:

This strange behavior occurs because the "mail" variable name is a reserved variable name and cannot be used in a new variable name.  

Resolution:

So changing the code to this will fix the problem:

Process.mailid = Process.Get_User_1.UserAccounts[i].mail; 

 

This is true for other variables from this operator as well.