How can I set the Stage field on RITM

anusha06
Tera Contributor

Hi All,

How can I set the Stage field on RITM, stage field is displaying the back end values instead of Label. Have not created any workflow for the item and handling the stage fields through UI actions and business rules.

 

find_real_file.png

 

Thanks & Regards,

Anusha K.

8 REPLIES 8

Hi,

So for the Requested Item stages, you'd want to first verify what you have to work with. So you'd want to go to the dictionary for "Stage" on your sc_req_item table, then at the bottom scroll down and see your "Choices", like so:

find_real_file.png

So here, I only have 3 stages without using a set workflow (with other stages)...so if I wanted manually set the stage for a RITM, I'd have to use one of these here. and so a line of my code could be:

current.stage= 'fulfillment';
current.state= 3;
current.update();
action.setRedirectURL(current);

Then the display value for the Stage field upon reload of screen should show as "Fulfillment".

Please mark reply as Helpful/Correct, if applicable. Thanks!

 


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Hi,

It's been a bit since my reply was posted. I just wanted to check-in and see how things are going.

If my reply helped guide you correctly, please mark it as Helpful & Correct.

Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Onkar Pandav
Tera Guru

Hi,

Could you share the details of that field or script?

getDisplayValue(); can be used to show lable.

--

Regards

Onkar

Mohit Kaushik
Mega Sage
Mega Sage

Hi There,

Ideally it should display the label instead of choice.

But wherever you trying to get the label of stage field, try to add getDisplayValue();

 

Thanks,

Mohit Kausik

Thanks,
Mohit Kaushik
ServiceNow MVP (2023-2025)