logo

NJP

XML Export selected columns from the table

Import · Feb 21, 2019 · article

Sometimes when you migrate XML from the lower environment to Prod, you only need few columns from that table to be migrated to Prod.For E.g.: From Test instance cmdb_ci_appl you only need assignment_group to be migrated.

This is possible with the below steps.

  1. Create a new view in your source table form. You can go to Configure Form Layout and in View's drop down select New..
  2. Add the required fields to the new view
  3. Try opening the table in new form view on the Native UI and check if your fields are visible
  4. Now comes the important part, of building a URL
  5. Use this for all records without filter:
    https://.service-now.com/.do?XML&useUnloadFormat=true&sysparm_view=
  6. Use this for all records with a filter:
    https://.service-now.com/.do?XML&useUnloadFormat=true&sysparm_view=&sysparm_query=
  7. The above URL contains below componentsmyinstance = Name of your instanceTableName = Name of the table you would like to exportViewName = Name of the view you just created
    yourQueryHere = On your table list view, right click on the filter and 'Copy url'. Paste that url in this block.

If you face any issues in following the instructions, please let me know in comments below, I will update the article.

Hope you find it helpful

Labels:

image

View original source

https://www.servicenow.com/community/now-platform-articles/xml-export-selected-columns-from-the-table/ta-p/2319570