How to use sub flow look up record records in sub flow script?

Harsh Vaghasiya
Tera Contributor

Hello All,

 

I was trying to make a flow which takes manager as approval for a request. I have prepared a flow design to extend approval request to manager of requestor, if active. If the manager profile is active false then, I want to extend the approval to the next manager, manager of requestor's manager.

 

HarshVaghasiya_1-1680197249337.png

 

 

For else part, I was using script to get ultimate active manager in line, I have used fd_data._2__look_up_records, but on running test it says fd_data is not defined. Below is the look up record action.

 

HarshVaghasiya_2-1680197264154.png

 

2 REPLIES 2

Ethan Davies
Mega Sage
Mega Sage

Hey Harsh,

 

Users can only have one Manager in ServiceNow. Who is the 'next manager'? Is it the Manager of the Manager?

Yes, I want the approval to be requested to manager of manager, if that user is also inactive then to the next manager (means manager of manager's manager), like wise until we find one active user in chain of manager.