10/31/2022 12:53 AM - edited 10/31/2022 01:22 AM
Hi,
I am trying to assign user's manager's manager (SKIP Manager) as the Assignee of access request using workflow custom assignment block.
Normally I found the skip manager using the below sql query:
select u2.manager as skipmanager_userkey from users u1, users u2 where u1.manager=u2.userkey (Self Join)
OR
select manager as skipmanager_userkey from users where userkey in (select manager from users) (Sub-Query)
Now I used the below query in CUSTOM ASSIGNEMENT block of workflow:
1) select u2.manager from users u1, users u2 where u2.userkey=${user.manager}
It is sending the request to "admin".
I read the comments on Solved: Workflow Custom Assignment for Secondary manager a... - Saviynt Forums - 10172 and changed the query in workflow to these one-by-one and tried:
2) select u2.manager as userkey from users u1, users u2 where u2.userkey=${user.manager}
3) select manager as userkey from users where userkey in (select manager from users where userkey = ${user.id})
4) select manager as userkey from users where userkey in (select manager as userkey from users where userkey = ${user.id})
None of these worked. In each case, the request was being assigned to admin.
I (person A) am using "request for others" in ARS to request for person B, whose manager is C and C's manager is D (D is B's skip manager).
So, this is not a case where requestor and beneficiary are same and request might go to admin. All people involved are different.
What's going wrong here, could you please assist on this?
Thanks in advance.
Solved! Go to Solution.
10/31/2022 01:47 AM - edited 10/31/2022 01:48 AM
Use Manager’s Manager Approval Block
or below query in custom assignment block
select u2.manager as userkey from users u2 where u2.userkey=${manager.id}
10/31/2022 02:11 AM - edited 10/31/2022 02:37 AM
Hi @rushikeshvartak ,
For the 4 queries that I tried before, the request would look like this after submitting
These admin assigned requests would also show up in request history and request approval.
But When I tried that query that you suggested :
select manager as userkey from users where userkey=${manager.id}
The request is not being assigned to anyone.
Once I close this page, this request is not showing up anywhere in request history or request approval.
Even when I search using this request's request ID, it is not showing in the history or approvals list.
(The Managers manager approval block is working perfectly and assigning the request to user's skip manager, but we want to use the custom assignment block for more future planned additions to this use case)
10/31/2022 04:16 AM
select manager as userkey from users where userkey= ${user.manager}
11/01/2022 12:51 AM
Hi @rushikeshvartak ,
Tried your query in custom assignment
select manager as userkey from users where userkey= ${user.manager}
The request again went to admin.
11/01/2022 04:14 AM
Share your workflow extract. Its working for me
11/01/2022 05:53 AM
11/01/2022 06:21 AM
Yss
11/01/2022 11:03 PM
The export contains GUID. Is it not sensitive information?
And can you please share your email ID, I'll share both the exports over there.
11/02/2022 08:48 AM
update zip & attach or send over private msg
11/02/2022 10:04 AM - edited 11/02/2022 10:05 AM
Just noticed your error make "Select User Field" field as CustomQuery
11/07/2022 12:30 AM - edited 11/07/2022 05:34 AM
Hi @rushikeshvartak , Thankyou so much.
It is working perfectly now.
The 'select user field' was to be set as custom query. The query that you shared, and my queries are all working and sending the request to SKIP Manager.
select manager as userkey from users where userkey= ${user.manager}
select u2.manager as userkey from users u1, users u2 where u2.userkey=${user.manager}
select manager as userkey from users where userkey in (select manager from users where userkey = ${user.id})
select manager as userkey from users where userkey in (select manager as userkey from users where userkey = ${user.id})
All of the above are working
Thanks
11/07/2022 09:11 AM
@haardik_verma - Please click the "Accept As Solution" button on the replies that best helped you. This will help future users find your thread, who are facing a similar problem as yours. Thank you!