Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grouping by a formula

Status
Not open for further replies.

taltonm

ISP
Nov 1, 2001
15
US
Here is an interesting one. I am trying to write a report to get Active Directory information out of our Domain and gime me a list of Organizational Units, Groups and Users. I managed to get the information out of Active Directory (mostly contained in a strin called ADSPath.. anyway. that is a String that looks like this:

LDAP://CN=Common_Name,OU=OrganizationalUnit,DC=Blah,DC=Blah,DC=net

so essentially what i need to do is break apart the string by the Commas and then be able to group by those values. there is not a said number of commas in a line.. could be 3, could be as many as 6 or 7.

I am not great with arrays and their placements but i think that i have to use them to accomplish this.. but could be wrong!

thanks in Advanced!
Mark

 
YOu should be able to use split()
@CommonName
split({ADSPath}, ",")[1]

returns first element

@OrgUnit
split({ADSPath}, ",")[2]

You should be able to group on this formula provided there are always at least 2 elements.


Ian
 
Geez, I did not know that it weas that easy!
thanks a bunch!

:)

Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top