How to customize a report for dynamic role assignment?

Hello experts,

We used dynamic role to assign uid_department to business roles, so that people in certain departments will be automatically assigned business role.

Now we need to generate a report to indicate what business roles are associated with a certain department. Could anyone give some advice on how to write the SQL query?

Thanks.

Parents Reply
  • Try this one:

    Select o.Ident_Org, o.FullPath, dg.UID_DynamicGroup, d.DepartmentName, d.Fullpath
    from Org o
    Join DynamicGroup dg on o.XObjectKey = dg.ObjectKeyBaseTree
    CROSS APPLY STRING_SPLIT(Replace(
    Replace(
    Replace(
    Replace(
    Replace(WhereClause,'(UID_Department in (', ''),'))',''),'or',','),'''',''),' ',''),',')
    join Department d on d.UID_Department = value
    where dg.WhereClause like '%UID_Department in (%'
Children