Mapping catalog item variables to RITM and sc task -short description and description

Mounika30
Kilo Sage

Mapping catalog item variables to RITM and sc task -short description and description

9 REPLIES 9

Runjay Patel
Giga Sage

Hi @Mounika30 ,

 

On RITM all variable display by default, and if you are creating sc task from flow then you have option to choose which all variable you wanna display on sc task.

 

-------------------------------------------------------------------------

If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.


Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay

-------------------------------------------------------------------------

Hi @Mounika30 ,

 

Did the solution help? 

 

-------------------------------------------------------------------------

If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.


Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay

-------------------------------------------------------------------------

Gaurav Shirsat
Mega Sage

Hello @Mounika30 

If I am getting your Question Correct? you want to map the Variables of Catalog item to RITM and Task.

so ideally these variable are available in Variable Editor Section below your RITM/SCTASK Fields on the Form.

Right way is to make Global check box true

Open your Variables or Separately open Variables of your Variable Sets. in the list view bring the Global column from the setting icon and make the Global value to true.

GauravShirsat_0-1736407564194.png

Please perform separately for Variables inside the Variable Sets.

alternate way is to make variables available from workflow if attached - but here you need to do this for every individual catalog task activity, with the help of slush bucket in the bottom

GauravShirsat_1-1736407923704.png

in the Flow Designer you have option in below which variable you want to display on the form.

GauravShirsat_2-1736408677866.png

 

Thanks and Regards

Gaurav Shirsat

Hi Gaurav,

 

I have 

please mention short notes on Catalog item ---> map--> RITM Short desription---> sc_task short description

Additonal comments on catalog item----> map---> RITM description ----> sc_task description

 

I have achieved until the catalog item variables to RITM SD, Description using Before BR.

 

(function executeRule(current, previous /*null when async*/) {

    // Add your code here
    var grRITM = new GlideRecord('sc_req_item');
    grRITM.addQuery('request',current.request);
    grRITM.query();

if(current.cat_item=='a92bbd8393730210eb7bfe818bba10da')
{

    while(grRITM.next())
    {

    current.description=grRITM.variables.please_mention_short_note;
    current.short_description=grRITM.variables.additional_comments;
    grRITM.update();
    }

}
   
})(current, previous);