How to take an export of Request Item Variable fields from sc_task table?

The Matrix
Tera Contributor

Hi All,

Can anyone how do I take an export of Request Item Variable fields from sc_task table?

4 REPLIES 4

nitin gupta1
Tera Contributor

Request Item variables are not stored directly on the sc_task table. The Catalog Task (sc_task) references the Requested Item (sc_req_item) through the Request Item field.

To export variable values, you can:

  1. Create a report on sc_task.

  2. Dot-walk to the Request Item field (Request Item → Variables), if the required variables are available for reporting.

  3. Alternatively, create a database view or script that joins:

  • sc_task
  • sc_req_item
  • sc_item_option_mtom
  • sc_item_option

This approach provides access to all catalog variable names and values associated with the RITM linked to the task.

If you need the data in Excel for a large number of tasks, a scripted export using GlideRecord is usually the most flexible option, as catalog variables are stored separately from the task record itself.

Tanushree Maiti
Tera Patron

Hi @The Matrix 

 

1. Refer: Adding catalog variables to the list view 

2. 

  • Create a new view for the catalog task records.
  • Navigate to System UI → Lists.
  • Locate the relevant table and choose the view you just created.
  • Insert a new record, entering the variable’s sys_id.
  • Return to the list and switch to your new view—the variables should now be visible.

Refer: https://www.servicenow.com/community/itsm-forum/how-to-add-variables-on-the-catalog-task-list-view/t...

https://www.servicenow.com/community/itsm-forum/how-to-add-variables-on-the-catalog-task-list-view/t...

 

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti

Nishant8
Tera Sage

Hello @The Matrix , I think its not possible to export sc_task alongside its associated Catalog Variables from the same page, as both are stored in different tables. However, could you please try whether followings help you?
https://www.servicenow.com/community/platform-analytics-forum/is-it-possible-to-export-all-fields-in...

https://www.servicenow.com/community/itsm-forum/how-can-i-export-the-catalog-item-variables/m-p/8028...

 

Regards,

Nishant

Ankur Bawiskar
Tera Patron

@The Matrix 

try adding those variables to list view and see after exporting if data comes or not

Adding catalog variables to the list view 

How to Add Catalog Item Variables in List View 

PSA: How to View Variables in Lists 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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