Last post Aug 21, 2006 12:23 AM by bdesmond
Aug 15, 2006 11:59 PM|DLoye|LINK
I am using an ASP page to show a drop down list of OUs that a user can select from.
The search query needs to return a filtered list of OUs, which excludes the OU "Deactivated User Accounts".
Here is the search filter:
strFilter = (&(objectCategory=organizationalUnit)(!name=Deactivated User Accounts))
It works fine if I use an OU name that contains no spaces.
If I use any OU that contains a spaces, it appears to ignore it.
If I take out the !(not), I get just the Deactivated User Accounts OU only, which is what I would expect.
Any help would be greatly appreciated.
Aug 16, 2006 08:45 AM|dunnry|LINK
Aug 17, 2006 07:27 PM|DLoye|LINK
Thanks for confirming that it should work.
Strange that it won't work though.
Works fine when I use AND(&) or OR(|), but not with NOT(!).
Have had to test for OU name to get around it:
ExcludeOU = "Deactivated"If inStr(1,OUNames,ExcludeOU,1)<>0 then
<Option Value="<%=DNName & ":" & OUDesc & ":" & OUNames%>"><%=OUDesc & "(" & OUNames & ")"%>
Aug 21, 2006 12:23 AM|bdesmond|LINK