How to create a drop-down list for catalog item

pathat
Kilo Expert

Hello.

I want to present the user with a drop down list with names of groups (in a remote system) when the user goes to request a custom catalog item I created (called "Request Remote Access"). In the catalog item definition I see the different types of variables I can create like "Lookup Multiple Choice", and I have played around with this a little. Here's what I think I need to do:

1. Create a new table to hold the group names I want to display

2. Populate the table with names (i can manually enter names for now)

3. In the catalog item definition, select type "Lookup Multiple Choice"

4. In the catalog item definition, point to this new table

5. Find a way to populate the table with values retrieved in real-time from an external system (using a scheduled web service that calls to it).


At this point, the user should be able to select the group name from a list displayed in the request form, instead of having to type it in (that's how it works now): Am I on the right track, or is there a better way to do this? Also, let me know if you've tried or know how to populate the table with a web service.


Thx!

13 REPLIES 13

bernyalvarado
Mega Sage

Sounds like you're on the right track!



You also have the option of creating it like a reference field. A reference field will give you the auto complete capability and also you can filter on the values of your cable (useful if you have various columns/properties on your table).



Thanks,


Berny


As for how to populate your table through a webservice you can use the table API that ServiceNow provides. it's really simple stuff!



http://wiki.servicenow.com/index.php?title=Table_API#gsc.tab=0



Thanks,


Berny


Thank you Berny. Actually I plan on using an outbound REST call from SN to retrieve the data from the remote system. A script in SN running on a schedule would make the call. In addition this script will need code for updating my custom table in SN.


Hi Berny. When creating a new table, I   see where I can specify that it extends an existing base table. If I'm going to use this new table for holding group names that a user can choose from when request a service order, what table do you suggest I extend? I'm going to leave this blank and just create the one column for group name which is all I need at the moment.