Exporting variables and variable sets from request item using export definition

Sachin Verma
Kilo Contributor

Hi, 

I am trying to export the request item data using export set, export definition and scheduled export.
Followed this thread https://community.servicenow.com/community?id=community_question&sys_id=38348729dbd8dbc01dcaf3231f961913&view_source=searchResult

But still I am not able to export the variables and variable set.
The exported data looks like : 

{
"records": [
 {
       "request_item.cat_item": "87c068cfdb975c9cb9186033ca9619ba",
       "sc_item_option.value": "3c5939491b489898ac846287bc4bcb3f",
        "request_item": "edec52d3db9714dcb9186033ca9619bf",
        "sc_item_option": "25ecda13db9714dcb9186033ca9619a6",
       "sc_item_option.item_option_new": "fcea6f674f9ee600d2d797411310c71d",
         "request_item.state": "3",
         "__status": "success"
}
]}

My export definition is 

find_real_file.png
 
 
In the List view, the chosen "Fields*" are also not visible :
find_real_file.png

 
 
 
It appears that the UUID of variables are getting exported.
Please suggest how to get all required "Variables" and "Variable Sets" values exported.
7 REPLIES 7

Hi,

I could see in screenshot for Fields you have added 6 fields

the same fields are seen in 2nd screenshot

correct me if I am wrong

Regards
Ankur

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

Hi Ankur,


I am now able to export the variables supplied by user (like multi-line text and select-box), 
But I am not able to export the data from "Variable Set" and "reference variables".
When I try to export only sysid is exported, not the the "Display Value".

Sample output :

Reference data variable (Group name) comes from custom table: 

{
"request_item.cat_item": "87c068cfdb975c9cb9186033ca9619ba",
"sc_item_option.value": "987a2c02db17109cb9186033ca9619d4",
"dv_sc_item_option": "58eae56cdb7314d856c40d0af49619e0",
"dv_request_item.cat_item": "Secure (PCI) AD User Modify Group Membership",
"dv_request_item": "RITM6608623",
"request_item": "d4eae56cdb7314d856c40d0af49619e2",
"sc_item_option": "58eae56cdb7314d856c40d0af49619e0",
"dv_sc_item_option.item_option_new": "Group Name",
"sc_item_option.item_option_new": "d8f32917db13d0dcb9186033ca96192c",
"dv_sc_item_option.value": "987a2c02db17109cb9186033ca9619d4",
"__status": "success"
}

Variable Set data variable (Approving Manager) :

{
"request_item.cat_item": "87c068cfdb975c9cb9186033ca9619ba",
"sc_item_option.value": "55c9c9fddb6ae70cb4a873e78c9619dd",
"dv_sc_item_option": "54eae56cdb7314d856c40d0af49619e0",
"dv_request_item.cat_item": "Secure (PCI) AD User Modify Group Membership",
"dv_request_item": "RITM6608623",
"request_item": "d4eae56cdb7314d856c40d0af49619e2",
"sc_item_option": "54eae56cdb7314d856c40d0af49619e0",
"dv_sc_item_option.item_option_new": "Approving Manager",
"sc_item_option.item_option_new": "00cde3e74f9ee600d2d797411310c74b",
"dv_sc_item_option.value": "55c9c9fddb6ae70cb4a873e78c9619dd",
"__status": "success"
}

 

Can you please suggest if it is even possible to export "Variable Set" and "reference variables" data using Export definition?

Thanks in advance for your help.

Hi Sachin,

you cannot export display value for reference variable or list variable as that is not stored directly in that Variable Ownership table

the values stores are only sys_ids

Regards
Ankur

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