Skip to main content

Exporting Sysids to a spreadsheet (CSV web service)

Exporting Sysids to a spreadsheet (CSV web service)

really useful post on how to get sysids added as a column to a CSV export (CSV web service)

in a nutshell:

- edit the system property


to add in the sys id column, or just add as a parameter to the URL like so:

- fire the URL at the instance, e.g. 'active tickets where vendor = <a vendor>', examples:^active=true^active=true^u_vendor=91c6f451371e420041c5616043990eee

this format seems to work also without editing the sys properties:


example on sys_choice table:



  1. You have done good work by publishing this article here. I found this article too informative, and also it is beneficial to enhance our knowledge. Grateful to you for sharing an article like thischina export data

  2. Excellent post. I really enjoy reading and also appreciate your work. This concept is a good way to enhance knowledge. Keep sharing this kind of articles, Mexico Export Data. Thank you.

  3. This post is so useful and valuable to increase our knowledge. I am happy that you have shared great info with us. Grateful to you for sharing an article like this. Vietnam Export Data


Post a Comment

Popular posts from this blog

ServiceNow check for null or nil or empty (or not)

Haven't tested these all recently within global/local scopes, so feel free to have a play! option 1 use an encoded query embedded in the GlideRecord , e.g.  var grProf = new GlideRecord ( 'x_cls_clear_skye_i_profile' ); grProf . addQuery ( 'status=1^ owner=NULL ' ); grProf . query (); even better use the glideRecord  addNotNullQuery or addNullQuery option 2 JSUtil.nil / notNil (this might be the most powerful. See this link ) example: if ( current . operation () == 'insert' && JSUtil . notNil ( current . parent ) && ! current . work_effort . nil ())  option 3 there might be times when you need to get inside the GlideRecord and perform the check there, for example if the code goes down 2 optional routes depending on null / not null can use gs.nil : var grAppr = new GlideRecord ( 'sysapproval_approver' ); var grUser = new GlideRecord ( 'sys_user' ); if ( grUser . get ( 'sys_id' , current . approver )){

Get URL Parameter - server side script (portal or classic UI)

Classic UI : var sURL_editparam = gs . action . getGlideURI (). getMap (). get ( ' sysparm_aparameter ' ); if ( sURL_editparam == 'true' ) { gs . addInfoMessage ( 'parameter passed ); } Portal : var sURL_editparam = $sp . getParameter ( " sysparm_aparameter " ); if ( sURL_editparam == 'true' ) { gs . addInfoMessage ( 'parameter passed ); }