This is a multi-part message in MIME format.

------=_NextPart_000_002F_01C53C28.A2C735D0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

How would I go about combining arrays into one array. Here's my script =
below. I first make objects for three different groups in AD.

Set objGroup1 =3D GetObject _
=
("LDAP://cn=3DGroupName1,ou=3DGroups,ou=3DC-ONL-Corporate,ou=3DONL,dc=3Dm=
ybusiness,dc=3Dcom")
objGroup1.GetInfo

Set objGroup2 =3D GetObject _
=
("LDAP://cn=3DGroupName2,ou=3DGroups,ou=3DC-ONL-Corporate,ou=3DONL,dc=3Dm=
ybusiness,dc=3Dcom")
objGroup2.GetInfo

Set objGroup3 =3D GetObject _
=
("LDAP://cn=3DGroupName3,ou=3DGroups,ou=3DC-ONL-Corporate,ou=3DONL,dc=3Dm=
ybusiness,dc=3Dcom")
objGroup3.GetInfo

Then I would like to make an array combining all three groups info like =
below

arrMemberOf =3D objGroup1.GetEx("member") & objGroup2.GetEx("member") & =
objGroup3.GetEx("member")

It doesn't work though. Is there a way to combine arrays?


Jeff Giroux
MSCIS Program
UOP Online
dabungis@email.uophx.edu
------=_NextPart_000_002F_01C53C28.A2C735D0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1492" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial>How would I go about combining arrays into one=20
array.&nbsp; Here's my script below.&nbsp; I first make objects for =
three=20
different groups in AD.</FONT></DIV>
<DIV><FONT face=3DArial></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial>Set objGroup1 =3D GetObject _<BR>&nbsp;("<A=20
href=3D"ldap://cn=3DGroupName1,ou=3DGroups,ou=3DC-ONL-Corporate,ou=3DONL,=
ou=3DSites,dc=3Dapollogrp,dc=3Dedu">LDAP://cn=3DGroupName1,ou=3DGroups,ou=
=3DC-ONL-Corporate,ou=3DONL,dc=3Dmybusiness,dc=3Dcom</A>")<BR>objGroup1.G=
etInfo<BR></FONT></DIV>
<DIV><FONT face=3DArial>Set objGroup2 =3D GetObject _<BR>&nbsp;("<A=20
href=3D"ldap://cn=3DGroupName2,ou=3DGroups,ou=3DC-ONL-Corporate,ou=3DONL,=
ou=3DSites,dc=3Dapollogrp,dc=3Dedu">LDAP://cn=3DGroupName2,ou=3DGroups,ou=
=3DC-ONL-Corporate,ou=3DONL,dc=3Dmybusiness,dc=3Dcom</A>")<BR>objGroup2.G=
etInfo<BR></FONT></DIV>
<DIV><FONT face=3DArial>Set objGroup3 =3D GetObject _<BR>&nbsp;("<A=20
href=3D"ldap://cn=3DGroupName3,ou=3DGroups,ou=3DC-ONL-Corporate,ou=3DONL,=
dc=3Dmybusiness,dc=3Dcom">LDAP://cn=3DGroupName3,ou=3DGroups,ou=3DC-ONL-C=
orporate,ou=3DONL,dc=3Dmybusiness,dc=3Dcom</A>")<BR>objGroup3.GetInfo</FO=
NT></DIV>
<DIV><FONT face=3DArial></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial>Then I would like to make an array combining all =
three=20
groups info like below</FONT></DIV>
<DIV><FONT face=3DArial><BR>arrMemberOf =3D objGroup1.GetEx("member") =
&amp;=20
objGroup2.GetEx("member") &amp; objGroup3.GetEx("member")</FONT></DIV>
<DIV><FONT face=3DArial></FONT>&nbsp;</DIV>
<DIV>
<DIV><FONT face=3DArial>It doesn't work though.&nbsp; Is there a way to =
combine=20
arrays?</FONT></DIV>
<DIV><FONT face=3DArial></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial></FONT>&nbsp;</DIV>
<DIV>
<DIV>
<DIV><STRONG><FONT face=3DArial>Jeff Giroux</FONT></STRONG></DIV>
<DIV><STRONG><FONT face=3DArial>MSCIS Program</FONT></STRONG></DIV>
<DIV><STRONG><FONT face=3DArial>UOP Online</FONT></STRONG></DIV>
<DIV><A href=3D"mailto:dabungis@email.uophx.edu"><STRONG><FONT=20
face=3DArial>dabungis@email.uophx.edu</FONT></STRONG></A></DIV></DIV></DI=
V></DIV></BODY></HTML>

------=_NextPart_000_002F_01C53C28.A2C735D0--

Re: combining arrays by Björn

Björn
Mon Apr 11 00:57:38 CDT 2005

> "Jeff Giroux" <noemail@not_here.com> wrote in message
news:uVRUQNGPFHA.2604@TK2MSFTNGP10.phx.gbl...
> How would I go about combining arrays into one array. Here's my script
below. I first make objects for three different > groups in AD.
>
> Set objGroup1 = GetObject _
>
("LDAP://cn=GroupName1,ou=Groups,ou=C-ONL-Corporate,ou=ONL,dc=mybusiness,dc=
com")
> objGroup1.GetInfo
>
> Set objGroup2 = GetObject _
>
("LDAP://cn=GroupName2,ou=Groups,ou=C-ONL-Corporate,ou=ONL,dc=mybusiness,dc=
com")
> objGroup2.GetInfo
>
> Set objGroup3 = GetObject _
>
("LDAP://cn=GroupName3,ou=Groups,ou=C-ONL-Corporate,ou=ONL,dc=mybusiness,dc=
com")
> objGroup3.GetInfo
>
> Then I would like to make an array combining all three groups info like
below
>
> arrMemberOf = objGroup1.GetEx("member") & objGroup2.GetEx("member") &
objGroup3.GetEx("member")
>
> It doesn't work though. Is there a way to combine arrays?
>
>
> Jeff Giroux
> MSCIS Program
> UOP Online
> dabungis@email.uophx.edu

I suppose you could try using the Join function to create a single string
containing all the array elements and then create a new array using the
Split function.

The following might work:

arrMemberOf = Split(Join(objGroup1.GetEx("member"), Chr(0)) & Chr(0) &
Join(objGroup2.GetEx("member"), Chr(0)) & Chr(0) &
Join(objGroup3.GetEx("member"), Chr(0)), Chr(0))


--
Björn Holmgren