The CreatorCon Call for Content is officially open! Get started here.

how to remove "Request Approved" Stage from RITM

varunp
Tera Guru

how to remove "Request Approved" Stage from RITM which automatically comes from request workflow.

find_real_file.png

1 ACCEPTED SOLUTION

Yea, I made a mistake.   I'd update the "Workflow-driven" Column Renderer by adding;



var currentChoice = choices.getChoice(0).getValue();

      gs.log(choices.getChoice(0));


      if(currentChoice == "approved" || currentChoice == "waiting_for_approval"){


      choices.removeChoice(0);


      }



This will remove these choices



So the first evaluate block should have this in it.



// get the api
var api = new SNC.RendererAPI('$[jvar_renderer]');


// build the full set of choices including subflows
// if we have an 'answer' global then it was populated
// by a getChoices bus-rule so use that otherwise
// use the renderer api to get them from the workflow
// generated choices in the context.
var choices = api.getAllWorkflowChoices(current, jelly.jvar_ref);
api.addIconsAndStatus(choices);

      var currentChoice = choices.getChoice(0).getValue();


      gs.log(choices.getChoice(0));


      if(currentChoice == "approved" || currentChoice == "waiting_for_approval"){


      choices.removeChoice(0);


      }


      choices;



Then you'll have to change the renderer on the workflow to use "Workflow Driven"



find_real_file.png



Then it should look like this for items using that workflow;



Cart;


find_real_file.png



List;


find_real_file.png


View solution in original post

13 REPLIES 13

HV1
Mega Guru

Its the default stages for Requested Item table.   You can find the default stages at Workflows --> Default Stages.


You can try removing the there, however, if there are stages defined on your workflow directly then that overrides these default stages. I would recommend creating your custom stages on workflow directly.


I tried removing from default stage->stage set,   but still, it is coming.


lks
ServiceNow Employee
ServiceNow Employee

This must be a choice list value, please check on which table it is defined and then perhaps you can try disabling there?


Thanks, Lalit


I tried disabling. But still, it is coming.