Catalog Item Variables

dev_K
Tera Contributor

Hi,

 

I was wondering where are the variables of a requested catalog item stored?

We have a RITM that stores the data passed in the request (like requestor, date etc.) but where exactly variables are stored that are particular to an individual catalog item?

 

Thanks!

4 REPLIES 4

Chaitali_Vale
Mega Sage
Mega Sage

Hello @dev_K ,

 

The variables for a requested catalog item are stored in the sc_item_option and sc_item_option_mtom tables.


1. sc_item_option Table: This table stores the values of the variables associated with catalog items. Each record in this table represents a single variable value.

2. sc_item_option_mtom Table: This table maps the variable values to the specific requested item (RITM). The sc_item_option_mtom table includes references to the sc_item_option table and the sc_req_item table.

 

Please marked solution as accepted or helpful if it is applicable,

 

Thanks!

Vrushali  Kolte
Mega Sage

Hello @dev_K ,

 

In ServiceNow, the variables specific to an individual catalog item are stored in the sc_item_option_mtom table (Item Option Mount-to-Mount table). This table links the variables (stored in the sc_item_option table) to the Request Item (RITM).

Here's how the relationship works:

  1. Request Item (RITM) Table (sc_req_item): This table stores the data related to the request, such as requester, date, etc.

  2. Catalog Item Option (Variable) Table (sc_item_option): This table stores the individual variables defined for catalog items.

  3. Item Option Mount-to-Mount Table (sc_item_option_mtom): This table maps the variables to specific RITMs. Each record in this table links a variable from the sc_item_option table to a specific RITM in the sc_req_item table.

To find the variables for a specific RITM, you can query the sc_item_option_mtom table where the request_item field matches the Sys ID of your RITM. This will give you the Sys IDs of the variables from the sc_item_option table.

 

If my answer solves your issue, please mark it as Accepted✔️ & Helpful👍!

Ayushi12
Mega Sage

Hi @dev_K 
Catalog Variables are stored in a table item_option_new. The variables are associated either to a catalog item or to a variable set. The association between catalog item and variable set is stored in io_set_item.

If my response proves useful, please indicate its helpfulness by selecting "Accept as Solution" and " Helpful."

Thanks!

Mark Roethof
Tera Patron
Tera Patron

Hi there,

 

Just wondering what the question is behind your question?

Because while scripting, in a lot of cases you don't need to know the tables involved, there other good and less complex options available.

 

Anyway regarding tables, most answers you will find or get are sc_item_option and sc_item_option_mtom. Though there is more involved, one of the example I mean: these don't involve Multi-Row Variable Sets!

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn