Update multiple records simultaneously setting fields to null
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-10-2008 06:29 AM
I need to do as noted in the following:
http://wiki.service-now.com/index.php?title=Update_multiple_records_simultaneously
...but I need to set the fields I'm changing from having a value to being undefined or null. In Remedy I would use $NULL$ with a mod-all action. What keyword do I put into the field to make that happen in SNC? Please advise. Thanks!
- Labels:
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-20-2015 09:57 PM
You can just search for the field being empty or not empty.
The easy way (in script):
var updateMultipleQuery = new GlideMultipleUpdate('table_name');
updateMultipleQuery.addQuery('u_name', '!=', ''); // look for records where there is a value
updateMultipleQuery.setValue('u_name', ''); // set an empty value
updateMultipleQuery.execute();