How to skip states (Untick) in the process flow when they are not met with the conditions?

Manasa_116
Tera Contributor

Hi Community,

 

We have a table called Visitor registration. In the process flow formatter, It has states like planned, checked in , checked out, no show, cancelled, disappeared.

If the visitor registration record is cancelled, the process flow doesn't need to tick all the states in between. It needs to show the cancelled state in process flow with a tick mark. How to achieve this?

 

I have tried with modifying the conditions in the flow formatter table, It doesn't work though.

Manasa_116_0-1738846376067.png

 

Any suggestion is much appreciated. Thanks in advance.

6 REPLIES 6

I think no, it will increase the technical debts, prefer not to do, you can educate users and avoid these changes.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Martin Bury
Tera Contributor

Before I will answer your question I want to follow the before given advice that any customizations will increase technical debts and should be avoided. 

But it is possible to only checkmark states which were visited before, which is also used by the demand management application. 

Therefore this is a combination of OOTB functionality and some customizations. 

If you already got the Process Flow Formatter in Place you will only need the following:

  1. On your table: a new field which collect the states which were already visited (Compare: Field "Visited States" on Demand Table)
  2. A Business Rule or other logic to fill your field with the correct entries (Compare: BR "Updated Visited States on state chang" on demand table)
  3. A global BR which is called [table_name]_ProcessFlowList: 
    1. Open the dmn_demand_ProcessFlowList BR (also mentioned within this Knowledge Article: Demand State Change Process flow formatter hides Completed stage.)
    2. Copy the code from the Script field
    3. Copy the code into your BR Script field - make sure that you override everything within the Script field of your BR
    4. Change the name of the function to [table_name]_ProcessFlowList()
    5. Exchange the collection field (visited_state) as well as the table name within the code
    6. Save

Since your instance got two different macros with the same name for the Process Flow Formatter, it will be picked by the system without other changes. 

Please use this with caution.