Jump to content

Recommended Posts

Posted

Hi

I am using Waters AD UDF and I am looking up a users "Name" AD attribute.  I can view the array returned but how can I show just the users Name only?

Here is the array returned.

I would like to show just "Anthony" in a message box.

array.PNG

Posted (edited)

@antmar904

I imagine that you wrote somewhere an instruction like

_ArrayDisplay($arrSomeArray)

To display that.

So, as you can see from the image, the array is composed by two Rows and two Columns.

An array like that is usually called 2D-Array, since it has two dimensions ( Rows and Columns ).

To access every single element in your array, you have to specify the Row and the Column ( which are called Indexes ) of that element, remembering that arrays are 0-based, and so, you have to start counting elements from 0, if you have two Rows and two Columns as you do, to show only the Name ( Row 1, Column 1 ), you can do something like

ConsoleWrite("Name = " & $arrSomeArray[1][1] & @CRLF)

More about Arrays can be found here :)

Edited by FrancescoDiMuro

Click here to see my signature:

Spoiler

ALWAYS GOOD TO READ:

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...