and more in a single search tool across platforms. Read the announcement here. |
02/29/2024 08:48 AM
Hi
I created an access approval workflow that has three steps.
1.Step : Manager approval
2.Step: First user group approvers
In this step I use custom assignment but this doesn't work. (here for the value of the filter in sql code I take the value from the user customproperty field)
SQL query :
So in this user group I have two users. First is admin user and that user can approve this request because it has admin permissions, but this request is not visible to another user (who has end user role as SAV role and one more role that have permissions for approval)
3. Step: Second user group approvers
This step is similar to step 2 only a slightly different sql query is used (here for the value of the filter in sql code I take the value from the dynamic attribute).
Solved! Go to Solution.
02/29/2024 09:12 AM - edited 02/29/2024 09:30 AM
HI @itinjic , what is not working ? is the approval request not assigned to those two users or one of the user is not able to view pending approval ?
your query outcome is user key where in select user field is user group. You can either change your query where the outcome is user_groupkey OR change the selection field to customquery.
Thanks,
Amit
If this answers your query, Please ACCEPT SOLUTION and give KUDOS.
Thanks,
Amit
02/29/2024 09:24 AM
@itinjic please change custom assignment selected field USERGROUP to CustomQuery
you're passing sql query need to use customquery and try it.
02/29/2024 08:19 PM
I see an issue with the custom assignment block.
You are using a query but passing User group.
Please change that to custom query.
It should work.
02/29/2024 09:05 PM
03/05/2024 06:15 AM
I changed this option to CustomQuery but still the same thing happens. I think the issue is in the last part of sql query (marked in red). When I omit that part and when I put a hardcoded value , for example "XXX Admin Approvers" then everything works fine and the user from the approver group can approve request. Here I need to use information from the user for whom the access request was created as #{user.customproperty2}).
select userkey from usergroup_users WHERE USER_GROUPKEY IN (SELECT UG.USERGROUPKEY FROM USER_GROUPS UG WHERE USER_GROUPNAME = (SELECT CASE WHEN LOWER(#{user.customproperty2}) = 'yyy' THEN 'YYY Admin Approvers' WHEN LOWER(#{user.customproperty2}) = 'zzz' THEN 'ZZZ Admin Approvers' WHEN LOWER(#{user.customproperty2}) = 'qqq' THEN 'QQQ Admin Approvers' ELSE 'XXX Admin Approvers' END))
03/05/2024 06:23 AM - edited 03/05/2024 06:35 AM
Hi @itinjic , #{user.customproperty2} is this a typo and you are actually using ${user.customproperty2}.
If not typo, correct that and use ${user.customproperty2} instead.
This page has the syntaxes - https://docs.saviyntcloud.com/bundle/EIC-Admin-v24x/page/Content/Chapter12-Workflows/Workflow-Compon...
Thanks,
Amit
If this answers your query, Please ACCEPT SOLUTION and give KUDOS.
03/05/2024 06:39 AM
I tried both (${user.customproperty2} and #{user.customproperty2}) but it doesn't work it can not read the values from user field customproperty2
03/05/2024 06:47 AM
Try this :
select userkey from usergroup_users WHERE USER_GROUPKEY IN (SELECT UG.USERGROUPKEY FROM USER_GROUPS UG WHERE USER_GROUPNAME = (SELECT CASE WHEN '${user.customproperty2}' = 'yyy' THEN 'YYY Admin Approvers' WHEN '${user.customproperty2}' = 'zzz' THEN 'ZZZ Admin Approvers' WHEN '${user.customproperty2}' = 'qqq' THEN 'QQQ Admin Approvers' ELSE 'XXX Admin Approvers' END))
03/05/2024 06:51 AM
Share logs this time if it doesn't work and also, if you can try with ${RequestedFor.customproperty} instead of user object also.
03/05/2024 07:28 AM
Thanks @AmitM its work now , looks like the '' symbols should have been added to the beginning and end of ${user.customproperty2}.
'${user.customproperty2}'
I also used this approach in the third approval step when I retrieve data from dynamic attributes and its work.
Maybe this has something to do with the type of data it checks because t checks against string values 🤔
03/05/2024 07:36 AM
Good to hear it worked!!