Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Request Roles Query

ewalton
Regular Contributor
Regular Contributor

Hello, I am trying to create a roles request query. What I am hoping to accomplish is to have an enterprise role that is only visible to request if the logged in / requesting user works in the R&D Department. Can you help me with modifying the current query to acheive this please? 

and ( substring_index (rl.customproperty16,',',1) = (select  users.employeeclass from Users users where users.id={currentUser} ) or  (substring_index(substring_index (rl.customproperty16,',',2),',',-1)=(select  users.employeeclass from Users users where users.id={currentUser} )) or (substring_index(substring_index (rl.customproperty16,',',3),',',-1)=(select  users.employeeclass from Users users where users.id={currentUser} )) )

1 REPLY 1

ewalton
Regular Contributor
Regular Contributor

The following query worked for our purpose. Roles are displayed based on the requestors department. 

and
( substring_index (rl.customproperty1,',',1) = (select users.departmentname from Users users where users.id={requestor} ) or (substring_index(substring_index (rl.customproperty1,',',2),',',-1)=(select users.departmentname from Users users where users.id={requestor} )) or (substring_index(substring_index (rl.customproperty1,',',3),',',-1)=(select users.departmentname from Users users where users.id={requestor} ))
)