Export the sys_id of Document ID column instead of display value

Nisar3
Giga Guru

In a table that has a column of type "Document ID"

Nisar3_0-1739335278544.png

When I try to export data from this table, the column value contains the label/display value and not its sys_id. 

Nisar3_2-1739335550325.png

and is in the format of <table_name>: <display value>

 

How would I go about exporting the sys_id of the referenced table?

 

PS: This is not about exporting the sys_id of the table on which the export is being attempted. It's about fetching the sys_id of a column that references another table. So while I'm well aware of the

?EXCEL&sysparm_default_export_fields=all

part, it won't work in my use case.

 

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@Nisar3 

that's the behavior with document ID field, it contains both the <Table Name>: <Display Value>

I don't think you can get sysId directly of the record being referred by Document ID field

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

View solution in original post

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

@Nisar3 

that's the behavior with document ID field, it contains both the <Table Name>: <Display Value>

I don't think you can get sysId directly of the record being referred by Document ID field

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

Ankur Bawiskar
Tera Patron
Tera Patron

@Nisar3 

you can try to create database view table and then export and then it might contain sysId

I haven't tried that yet.

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

dp11
Tera Guru

Did you find a solution to this? I too need to extract the sys_id from a document ID

I used database view.