Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

script

Shrabanti
Tera Contributor

hello

i need a script in incident form for choosing specific choice in category field  then it will filter out those ritm numbers as choice list in that requested item field which have two specific catalog item

1 ACCEPTED SOLUTION

@Shrabanti 

then update the ref qualifier

javascript: var query; if(current.subcategory.getDisplayValue() == 'Delayed Delivery') query = 'short_descriptionLIKE' + 'Request a Client Device,Break & Fix device'; query;

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

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

View solution in original post

8 REPLIES 8

Ankur Bawiskar
Tera Patron
Tera Patron

@Shrabanti 

requirement is not clear. Please explain with screenshots.

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

Hello @Ankur Bawiskar 

for choosing of  sub category variable as delayed delivery then Filter the Requested Item variable list for only "Request a Client Device" and "Break & Fix device"

Shrabanti_2-1700113116362.png

 

@Shrabanti 

you can use advanced ref qualifier on Requested Item field

something like this

javascript: var query; if(current.subcategory.getDisplayValue() == 'Delayed Delivery') query = 'cat_item.nameIN' + 'Request a Client Device,Break & Fix device'; query;

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

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

hello @Ankur Bawiskar 

there is no specific catalog item field in reference ritm table. so we have to take short description field despite of cat_item field.