Home
Extended ECM
API, SDK, REST and Web Services
Group membership
Washington_D.C._Office_(DC_OFFICE_(Delete)_2546016
How can find all the groups that a user belongs to? What Oracle tables/columns should I be looking at?I know that in kuaf there is field GROUPID that identifies the primary group (department) the user belongs to but I don't know how to identify any other groups to which a user may belong.Thanks - Loukis
Find more posts tagged with
Comments
Jos_Doldersum_(oranjuser3_-_(deleted))
Try this SQL-command, replacing usernumber by the id of the user in the kuaf table :select kuaf.id, kuaf.namefrom livelink.kuaf, livelink.kuafchildrenwhere kuaf.id = kuafchildren.idand kuafchildren.childid = usernumberand type = 1
Bob_De_Garmo_(degarmob_(Delete)_2518944)
KuafChildren is the direct and simple answer to your question... But perhaps a li'l explanation will help.Here is the SQL to produce the report you're asking for:select k1.name "Group Name" from kuafchildren kc, kuaf k, kuaf k1 where k.id = %1 and k1.type = 1 and k1.id = kc.id and kc.childid = k.id To use this SQL in a LiveReport, define a User Input parameter of type User in the report's definition. Additional info: The Kuaf table contains both Users and Groups, differentiated by the Type field; Type 0 = Users, Type 1 = Groups. The KuafChildren table defines memberships. ID Field is a Foreign Key back to a Group's definition in Kuaf, and ChildID is a Foreign Key back to a User's definition in Kuaf.So... The SQL joins to the Kuaf table twice. Once to filter by User, and once to obtain the Group info of the Groups the user is a member of as determined by the join to KuafChildren.Hope that provides what you need...-Bob De Garmo
Marco_Wallig_(x-siemensicnuser42_-_(deleted))
-------------------------------------------------------Inputs String UserSELECT DTree.*, KUAF.ID KUID, KUAF.Name KUNa, KUAF_1.ID KUID1,KUAF_1.Name KUNa1, DTree.Name DTN FROM DTree INNER JOIN (KUAF AS KUAF_1 INNER JOIN (KUAFChildren INNER JOIN KUAF ON KUAFChildren.ChildID=KUAF.ID) ON KUAF_1.ID=KUAFChildren.ID) ON DTree.DataID=KUAF_1.Type WHERE KUAF.Name=%1;(for MS SQL 2000)Paramter %1 Userinput 1Reportformat LivereportDisplay columns "KUNa1 Roll in Project"-------------------------------------------------------hope it helps, ciao Robert