Update multiple records simultaneously setting fields to null

Not applicable

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!

5 REPLIES 5

Valor1
Giga Guru

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();