Hi.
I'm using the fnLDAPQuery UDF to extract user details from our W2k3R2 AD. It was working brilliantly until I added "description" to the $aAttributes. The error I get is:
ERROR : Error in expression: this type of array not supported in expressions.!
Script: C:\Scripts\Kix\GetUsers.kix
Line : 31


Line 31 is the 'else' line.

I have modified the code slightly to return values for each user on one line separated by a comma, EG. Name,Department,Mail,Description. If I don't query for description it works great. I've tried the original code and get the same error.

Any help greatly appreciated. Idiot Guide approach would be perfect :-)

Pete.

My Code:
 Code:
$aAttributes = "Name","Department","mail","Description"
$aResults = fnLDAPQuery($aAttributes,$sADsPath,$strFilter)
For $c = 0 to Ubound($aResults)
	For $r = 0 to UBound($aResults,2)
		If $r > 0 
			$UserDetails = $UserDetails + "," + $aResults[$c, $r]
		Else
			$UserDetails = $aResults[$c,$r]
		EndIf
	Next 
	$UserDetails ?
	$UserDetails = "" 
Next 


Original Code:
 Code:
For $c = 0 to Ubound($aResults) 
    For $r = 0 to UBound($aResults,2) 
        $aResults[$c,$r] ? 
    Next 
    ? 
Next