ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

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


Article ID: 5467


Updated On:


CA Process Automation Base


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.  


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


Release: ITPASA99000-4.3-Process Automation-Add On License for-CA Server Automation


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.