Get URL for specific request type

jasonfmj
Kilo Contributor

Hello dear community, 

 

I have a catalog task with several request Types:

jasonfmj_0-1735326073205.png

 

Whenever i open the url, the type selection goes automatically to the first item.

I was wondering, is there any way to get a new url so the request type selected is another one and not the first one?

For instance, if a user click on the URL, can I make it to select the desired request type instead of always showing the first one as default?

 

Thanks in advance

 

3 REPLIES 3

JenniferRah
Mega Sage

If you want it to not show a default, click the "Include none" checkbox in the "Type Specifications" tab.

 

If you want to alter the URL to select a specific type, you can add a parameter to your URL, say you call it myType. Then in your default value of your field you can add this code:

javascript: gs.action.getGlideURI().getMap().get('myType')

 

 

Gangadhar Ravi
Giga Sage
Giga Sage

Hi @jasonfmj I think you may need to create onLoad client script for this. please check this community post.

 

https://www.servicenow.com/community/itsm-forum/fill-catalog-variable-via-url/m-p/2748704

 

Please mark my answer correct and helpful if this works for you.

Ankur Bawiskar
Tera Patron
Tera Patron

@jasonfmj 

it always shows as 1st because that's the way how the variable and it's choices are configured

you can include None as choice and make it mandatory so that user can select whatever they with to

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