- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2018 06:50 AM
Hi
I need some help with the workflow I'm going to work on.
I have to find the REQs which need 'Infosec' approval and set the LM as the level 1 approval. Once LM approves, the approval group 'Infosec' get a notification that the REQ needs their approval. If there's no line manager, add line manager first to get the approval. I'm trying to do on 'group approval' table however I'm not able to set all the conditions.
How to set the condition if the requests need infosec approval?
How to drill into 'Request' table to pick 'LM approval. I don't know how to go about with this WF. Any help/tips much appreciated.
Thanks
Lina
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2018 01:06 AM
Hi All,
Thank you all for your suggestions.
I achieved the result by using a flow designer. It's just perfect for my requirements. Just in case if anyone wants to use it, attached is the screenshot of the flow designer.
Thank again

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2018 07:27 AM
Usually you would have the workflow on the Requested Item not the request. This would make it easier as no matter how many items are ordered in a request you have a different workflow for each or possibly a generic workflow for ones that can follow the same process. As for getting the LM is this person in the manager field in the sys_user table?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2018 07:41 AM
Thanks for the reply. Line Manager(LM) is in sys_user table.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2018 07:53 AM
So for the first approval in the workflow you can just set it to the requested_for.manager. If your workflow is that the request item level you would need to set it at the request.requested_for.manger. You set this by clicking on what I have circled in red in my screenshot after you unlock the approval user.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2018 07:31 AM
use
this table to query sysapproval_approver
var gr = new GlideRecord('sysapproval_approver');
gr.query();
while(gr.next())
{
var requested_item_number = gr.getValue('document_id'); you will get at which requested item approval attached
you fing RITM number just split that
requested_item_number .split(" ");
var RITM_number = requested_item_number [0]// actual requested item
var approvar_state = gr.getValue('state');
if(approvar_state =='requested')
{
// approval attached to this request.
do your thing here.
}
// if approved your requested state will change
if(approvar_state =='approved')
{
// do your code here
}
}