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

I made this change to the Workflow-driven" Column Renderer and got the desired results on the cart view 

find_real_file.png

BUT on the list view I am still seeing the "Request Approved" stage first. 

find_real_file.png

Do I have to modify anything else besides the Workflow-driven" Column Renderer ?

Please explain how to implement this?

varunp
Tera Guru

This is working on native UI. Any idea how to do this on Service Portal?

I haven't looked into this.  I'd open a new post about this thought to get some fresh eyes on it.