Flow Designer - Skip approval if opened by or requested for title contains director or president

GB14
Kilo Patron

Is there a way to Skip approval if opened by or requested for title contains director or president in flow designer?

In the workflows, we have a IF conditions and we added a script but I cannot figure it out in flow designer. 

 

How can this be achieved in flow designers?

1 ACCEPTED SOLUTION

GB14
Kilo Patron

I was able to achieve it via the subflow. 
https://www.youtube.com/watch?v=nqKAQg9hZUI  Helped to figure out. 

View solution in original post

12 REPLIES 12

AnveshKumar M
Tera Sage
Tera Sage

Hi @GB14 ,

You can use the IF in Flow Logic to check this.

You can dot walk to the title field use contains operator like below.

 

Trigger->Requested Item->Requested For -> Title ::: CONTAINS ::: Director

OR

Trigger->Requested Item->Requested For -> Title ::: CONTAINS ::: president

 

 

Refer the following doc for quick reference.

 

https://docs.servicenow.com/bundle/utah-application-development/page/administer/flow-designer/concep... 

 

 

Thanks,
Anvesh

Thanks @AnveshKumar M 

I had the dotwalk info but since there are too many titles so I believe Script will be easier to manage or create. 

Riya Verma
Kilo Sage
Kilo Sage

Hi @GB14 ,

 

Hope you are doing great.

  1. Create a new Flow or open an existing one where you want to incorporate the skipping of approval based on the title. Locate point where you want to add condition to skip the approval.

  2. Add a new Decision element to the Flow Designer canvas.

  3. Configure the Decision element and try using below reference code:

 

gs.getUser().getTitle() == 'Director' || gs.getUser().getTitle() == 'President'

 

  • Connect the Decision element to the appropriate path, depending on the outcome of the condition.

    • If the condition is true, connect to activity skipping the approval .
    • If the condition is false, connect it to the path that leads to the approval task.
Please mark the appropriate response as correct answer and helpful, This may help other community users to follow correct solution.
Regards,
Riya Verma

@Riya Verma Are you able to share a screenshot on how to perform the above steps?

I wasn't able to complete it, unfortunately.