Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

Add short description in RITM by adding the values or filled by the user in a catalog form variable

Aakhiil
Tera Expert

Hi Experts,

I have one variable called " Request type" when ever user submit the item. variable value need to be populate on RITM "short description" . 
I have written this script in flow design but it won't work. any one please help me on this.

Note: item short description is mandatory so already given some content.But now here as per my requirment variable value only populate on RITM short desc level.

Aakhiil_1-1682941648454.png

also i tried this script 
current.short_description= current.variables.request_type;

Aakhiil_2-1682942089929.png


Any help will be appriciated.

Thanks in Advance


1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron

@Aakhiil 

why to update the RITM in GET Catalog variables step?

you can use update record action and set the short_description like this

No scripting required; just drag and drop the Pill

AnkurBawiskar_0-1682951394254.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 10x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

View solution in original post

14 REPLIES 14

Ankur Bawiskar
Tera Patron

@Aakhiil 

why to update the RITM in GET Catalog variables step?

you can use update record action and set the short_description like this

No scripting required; just drag and drop the Pill

AnkurBawiskar_0-1682951394254.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 10x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hi @Ankur Bawiskar 
Thanks for your response.
Here I am unable get/pill the variables on update record action.(Not sure item is created through cat builder ) Can I go with this script 

var gr = new GlideRecord('sc_req_item');
gr.addQuery('request',current.request);
gr.query();
while(gr.next())
{
gr.short_description = current.request_type;
gr.update();
}

Aakhiil_0-1682953229824.png

 

@Aakhiil 

it should be possible and easy

can you share your complete flow screenshots?

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 10x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hi @Ankur Bawiskar 
Thanks for you time.Here is the screenshots 

Aakhiil_0-1683011490373.png

 

Aakhiil_1-1683011519147.pngAakhiil_2-1683011581218.png

 

Aakhiil_3-1683011635079.pngAakhiil_4-1683011695537.png

Thanks

@Aakhiil 

are you not able to select the variable from Get Catalog Variable step inside the Update record action?

can you share screenshot of Update Record action step?

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 10x ServiceNow MVP  ||  ✨ ServiceNow Community Leader