Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
Recursive search for users.
Carol_Meeks_(galcdevelopment_-_(deleted))
I am using LAPI to search for Livelink users using ListUserGroup. The search performs as expected when the groupId is set to LAPI_USERS.SYSTEM, but when I try to limit the search to a specific group, the subgroups contained in the search group are not be recursively searched. Does anyone know if this is possible without writing some sort of complicated tree traversal to search each group and merge the results set? '****Code Sample in VB.NET******'* I want to replace LAPI_USERS.SYSTEM'* with a groupId and I want it to search'* recusively.'***************************Public Shared Function SearchByFirstName(ByVal objSession As LLSession, ByVal iSearchOperator As Integer, ByVal strFirstName As String) As ArrayList Dim limit As Integer = 1000 ' The maximum number of results to return. Dim startId As Integer = 0 Dim startValue As String = "" Dim action As Integer = LAPI_USERS.NEXT Dim objRows As LLValueEnumeration Dim alFirsts As New ArrayList 'Run a search based on the first name. If strFirstName.Length > 0 Then Dim LL_FirstNames As LLValue = Data.Livelink_Users.Search(objSession, LAPI_USERS.SYSTEM, LAPI_USERS.FIRSTNAME, iSearchOperator, strFirstName, limit, action, startId, startValue) 'Get an enumeration of the results set. objRows = LL_FirstNames.enumerateValues() ' Loop thru all the rows and add the names to the ArrayList While objRows.hasMoreElements() Dim objRow As LLValue = objRows.nextValue() alFirsts.Add(objRow.toString("FirstName") & " " & objRow.toString("LastName")) End While End If Return alFirstsEnd Function
Find more posts tagged with
Comments
There are no comments yet