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.

Where maintain item or record producer variables are stored initially?

SNOW User8
Giga Guru

HI All,

I need to know that Where maintain item or record producer variables are stored initially?

If anybody knows the answer kindly share with me.

Thanks in advance,

SNOW

1 ACCEPTED SOLUTION

Hi,

 

As per the script you are asking about the Catalog Item and not record producer. Please find the below script:

 

var mandatoryFieldCheck = new GlideRecord('item_option_new');
mandatoryFieldCheck.addQuery('cat_item','sys_id of catalog item');
mandatoryFieldCheck.addQuery('active',true);
mandatoryFieldCheck.query();
while(mandatoryFieldCheck.next()){
if(mandatoryFieldCheck.mandatory == true)
gs.print(mandatoryFieldCheck.question_text);
else
gs.print('Not mandatory');
}

 

Regards,

Ram M

View solution in original post

9 REPLIES 9

rammohanraomadd
Kilo Guru

Hi,

 

Variables will be stored in Question (question) table. Once the user submit the issue then the values will be stored in Question Answer (question_answer) table.

 

Regards,

Ram M

Hi,

Above is the information related to record producer.

 

Below is the information related to Catalog Items:

1. Variables - Variables (item_option_new)

2. After Submission - Variable Ownership (sc_item_option_mtom) && Option (sc_item_option)

 

Regards,

Ram M

Hi

Thanks for your valuable time,

I need to know one thing like I am unable to get variables based on the particular catalog item

What can I do?

Kindly help  me.

 

Hi,

 

Variables can be defined in 2 ways.

1. Creating a variable directly

2. Through variable sets

 

To get the variables related to a specific catalog item. Please find the below url

https://instance.service-now.com/item_option_new_list.do?sysparm_query=cat_item%3Dsys_id //sys_id represents sys id of catalog item

 

To get the variable sets related to Catalog:

https://instance.service-now.com/io_set_item_list.do?sysparm_query=sc_cat_item%3Dsys_id //sys_id represents sys id of catalog item

 

Open each variable set and you can find the variables in the variable set which are displayed in catalog item.

 

Regards,

Ram M