Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

Flow formatter chevrons - show/hide

Tom Lapkowicz
Tera Expert

Hello.  I have created chevrons for our Demand form using the Flow Formatters screen.

 

If the State is equal to Rejected then I would like the Rejected chevron to show and the Completed chevron to not show.

 

If the State is anything besides Rejected then I would like the Completed chevron to show and the Rejected chevron to not show.

 

Is this possible?  Thank you!

9 REPLIES 9

AdamEndwright
Tera Contributor

Does anyone know what controls the visibility of "Deferred"?  Having "Rejected" behave the exact same way would be ideal.

I was looking into this as well and came across this video -> https://www.youtube.com/watch?v=gt1URM4EQSE&t=22s

 

Seems there is a Business Rule: dmn_demand_ProcessFlowList that drives this behaviour, haven't tested it yet, but will give it a try 🙂

Dive into our latest video tutorial on customizing chevrons in ServiceNow. This step-by-step guide will walk you through the process of adjusting chevrons to better organize and navigate your ServiceNow interface, enhancing your overall user experience. Whether you're a beginner or an experienced

I think this will work.  I edited the Business Rule called dmn_demand_ProcessFlowList and added this towards the bottom after the Deferred code, but before the choices.add(choice).

			// If Rejected
			if (gr.sys_id == 'Sys_IdOfTheSys_Process_Flow_For_Rejected') {
    			if (current.getValue('state') != '7')
        		continue; // Don't show Rejected unless current state is Rejected

Has it worked then? I had an attempt shortly after my post and it didn't work for me. I tried to replicate the OOTB script for Deferred as I wanted similar behaviour, Completed to be replaced by Rejected. I also wanted to make it work in a specific teamspace, so maybe it was a clash with the OOTB BR which I left alone.

It seems to work for me.  I had tried copying and changing the code they had for Deferred, but it came back with funky results.  The code I pasted above was suggested by AI but seems to work.