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

Approval Workflow Custom assignment is not working if user group contains multiple members.

deepali198
New Contributor
New Contributor
Hello All,
 
In the approval workflow we are using custom assignment with 'select User Field' as 'Custom Query'.
In the SQL query we added few conditions to satisfy and based on that it should assigned to admin or Franchisee user group. But when there is more than one member in the user group approval is getting assigned to the Admin(userkey 1).
 
Below is the SQL:
select CASE WHEN count(raa.attribute_value) then (select uu.userkey from usergroup_users uu, user_groups ug where uu.USER_GROUPKEY=ug.USERGROUPKEY and ug.USER_GROUPNAME='${requestedby.customproperty31}') else 1 end as 'userkey' from request_access_attrs raa , ars_requests ar, request_access ra WHERE ar.REQUESTKEY = ra.REQUESTKEY and
ra.REQUEST_ACCESSKEY = raa.REQUEST_ACCESS_KEY and ar.requestkey=${ARSREQUEST.id} and ((raa.ATTRIBUTE_NAME='accountname' and raa.attribute_value in(
select acc.name from accounts acc where acc.endpointkey=261) > 0) or (raa.ATTRIBUTE_NAME='AccType' and raa.attribute_value = 'DEP Account'))
 
deep198_1-1683717830417.png

 

 
Thanks,
Deepali
 
1 REPLY 1

Darshanjain
Saviynt Employee
Saviynt Employee

Hi @deepali198 

Can you let us know what you see in the logs when request is being created, you can attach the snippet of logs where sql query is calculated and assignee are being  set.

 

Useful logline to check from- totalNumberofArsRequst---[workflowname] 

 

Thanks

Darshan