I forgot to mention, I attended the Infopath Master Class in-person this past September, so I've got DBXL and the ADWS already installed :)
I dragged the data fields for the GetAllUsers datasource to a blank form and tried experimenting with the filter and Max Count query fields. the most I could ever get to show is the first 100 alphabetical names in an OU, which I set as the datasource of a drop-down list just fine. Setting the Max Count query field doesnt change the results. I never could get the Filter query field to work right either; I'm just unsure of the syntax that it's looking for. I tried various things, and when it didnt error out giving me the following response, the results were empty ("Maintenance" Filter was used):
The query cannot be run for the following DataObject: GetAllUsers
InfoPath cannot run the specified query.
The SOAP response indicates that an error occurred on the server:
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.ArgumentException: The (&(objectCategory=person)(objectClass=user)(!(userAccountControl:1.2.840.113556.1.4.803:=2))(userAccountControl:1.2.840.113556.1.4.803:=512)(Maintenance)) search filter is invalid.
at System.DirectoryServices.SearchResultCollection.ResultsEnumerator.MoveNext()
at System.DirectoryServices.SearchResultCollection.get_InnerList()
at System.DirectoryServices.SearchResultCollection.get_Count()
at Qdabra.ActiveDirectory.AdUserInfoImpl.CreateDropDownList(SearchResultCollection results, String listName, String displayPropertyName1, String displayPropertyName2)
at Qdabra.ActiveDirectory.AdUserInfoImpl.GetAllUsers(String OU, String filter, Int32 maxCount)
at Qdabra.Dbxl.AdUserInfo.Qdabra.ActiveDirectory.Services.IAdUserInfo.GetAllUsers(String OU, String filter, String maxCount)
--- End of inner exception stack trace ---
What is a valid search filter, and how to I get back more than 100 results?
One more thing: when I run the query, the only results returned are a Value column with the "User Logon Name" and Display column with the "Display Name" fields from AD. Would I have to feed these results into another query to get the department for each of the users?
Thanks!