Export List of Records into CSV with SysID

salvadormarchan
Kilo Guru

Hello All,

I really need help on the scenario that one of Managers is asking me. They wanted to export CSV files from a List of Records including the SysID (32 long string ID). I can find it individually but not as part of a list.

Please advise how to do this.

Thank you in advance.

Dor Marchan
one month-old newbie admin

30 REPLIES 30

@ all: Just an update...the reporting manager decided to export and parse for now.

@ ctomasi: The reporting manager mentioned about data warehousing in SQL Server. Right now, the reportings are done in SQL Server Reporting using cube, etc... and shareable and reportable in Sharepoint. I believe their reporting system is matured enough and changing it would be a gamble for now. I see the SNC reporting appears appealing too but I guess, the advisory committee here are not yet reviewed to utilize SNC reporting.

Also, I agree and appreciate to your approach of asking for rationale and purpose of such request. At this point in time, we are in the initial phase and everything is dynamic. I am recording every and each request; we (admins with our manager) are reanalyzing the control/admin/SOP behind each request and look for other ways to make things securely efficient.

Thanks again...


great advice chuck......


john_abbott
Kilo Contributor

I needed to make a systematic change to the names of all CI of certain type.
I unloaded the table to XML, opened it in Excel, deleted all the columns other than name and sys id, deleted the first row as it was blank, made my changes, saved the resulting xls file and imported it into SN. The mapping assistant did not offer sys id as a target so I added the mapping manually. I set coalesce to true for sys id and ran the transform successfully. Job done.


abdulmominkhan
Kilo Contributor

I have face similar issue but able to solve easily with the help of background script



var gr= new GlideRecord('table_name');
gr.query();
while(gr.next()){


gs.print(gr.sys_id + "***" gr.column_title+ '\n');


}



Copy and paste the result in any editor, (I am using EditPlus), Now relpace *** with TAB. Copy and paste the result in Excel


salvadormarchan
Kilo Guru

All,


Over time, after 4 years, my technique of retrieving sys_id and other attributes/values intoa CSV of Excel file is as follows:



1. filter in a list view the records you needed.


2. extract/export XML


3. depending the size, open with MS-Excel apps.


4. trim and clean the file tot he columns you needed only (this is with the sys_id).


5. Save As into whatever datafile format you prefer via Excel apps.



NOTE: The only rationale why I extract with sys_id is for analysis and evaluation only. If you are going to use it for operational purposes, please find a more automated approach.



I hope this helps.


Thanks,


Dor