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

Workflow Custom Assignment for SKIP Manager

haardik_verma
Regular Contributor
Regular Contributor

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}

haardik_verma_1-1667201514927.png

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.


Thanks & Regards,
Haardik Verma
12 REPLIES 12

rushikeshvartak
All-Star
All-Star

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}


Regards,
Rushikesh Vartak
If you find this response useful, kindly consider selecting 'Accept As Solution' and clicking on the 'Kudos' button.

Hi @rushikeshvartak ,

For the 4 queries that I tried before, the request would look like this after submitting

haardik_verma_0-1667207121361.png

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.

haardik_verma_1-1667207365413.png

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)


Thanks & Regards,
Haardik Verma

select manager as userkey from users where userkey= ${user.manager}


Regards,
Rushikesh Vartak
If you find this response useful, kindly consider selecting 'Accept As Solution' and clicking on the 'Kudos' button.

Hi @rushikeshvartak ,

Tried your query in custom assignment

select manager as userkey from users where userkey= ${user.manager}

The request again went to admin.


Thanks & Regards,
Haardik Verma

Share your workflow extract. Its working for me


Regards,
Rushikesh Vartak
If you find this response useful, kindly consider selecting 'Accept As Solution' and clicking on the 'Kudos' button.

Hi

Extract as in ADMIN>Transport>export ?

 


Thanks & Regards,
Haardik Verma

Yss


Regards,
Rushikesh Vartak
If you find this response useful, kindly consider selecting 'Accept As Solution' and clicking on the 'Kudos' button.

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.


Thanks & Regards,
Haardik Verma

update zip & attach or send over private msg


Regards,
Rushikesh Vartak
If you find this response useful, kindly consider selecting 'Accept As Solution' and clicking on the 'Kudos' button.

Just noticed your error make "Select User Field" field as CustomQuery 

rushikeshvartak_0-1667408668148.png

 


Regards,
Rushikesh Vartak
If you find this response useful, kindly consider selecting 'Accept As Solution' and clicking on the 'Kudos' button.

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.

haardik_verma_0-1667808639705.png

select manager as userkey from users where userkey= ${user.manager}

haardik_verma_1-1667809015533.png

select u2.manager as userkey from users u1, users u2 where u2.userkey=${user.manager}

haardik_verma_2-1667809236826.png

select manager as userkey from users where userkey in (select manager from users where userkey = ${user.id})

haardik_verma_4-1667809454847.png

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


Thanks & Regards,
Haardik Verma

@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!