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

Allen Andreas
Administrator
Administrator

Hi,

Can you share your script that you're using to populate the stage field?

Please mark reply as Helpful, if applicable. Thanks!

 


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

Hi Allen,

By using UI action I'm trying to change the Stage field, please find below the code snippet I have used.

current.stage="Completed";
current.state=3;
current.update();
action.setRedirectURL(current);

 

Thanks & Regards,

Anusha K.

 

Hi Anusha,

We need to set the back end values to he choice type fields. So instead of setting 'Completed' set the backend value for Completed label in the stage field.

find_real_file.png

 

As you see in this screenshot the value for Fulfillment is 'fulfillment' so i will set the stage as

current.stage='fulfillment' // instead of Fulfillment same way you need to see the value for Completed label in your stage and set that to current.stage in your UI action.

 

Thanks,

Mohit Kaushik

Thanks,
Mohit Kaushik
ServiceNow MVP (2023-2025)

Hi,

Give the value name instead of label.

current.stage='complete';

See if it works.