- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-12-2016 06:10 AM
Hi All,
I am trying to update a reference field to empty for all records.
I tried filtering and update all on those records to make the reference field empty.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-12-2016 06:14 AM
Hi Chris,
Have you tried this
gr.assigned_to = "";
Re: Updating reference fields with 'NULL'
Regards,
Harshvardhan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-12-2016 06:35 AM
I was hoping to just keep it simple by right clicking and updating all/selected records to make a reference field null.
I know this can be done through gliderecord and background script. If this cannot done through the right click and update script I will mark the glide script answer correct.
Thanks
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-12-2016 06:39 AM
Hi Chris,
Main problem with Update All is that you need to put something in the field where you want to change the value. Leaving it untouched will not update the value.
In case of reference fields, you can't just add a space I assume as it's not going to be empty anymore.
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-12-2016 06:52 AM
I was hoping there was a easier solution.
Thanks Sergiu

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-29-2018 01:59 AM
I have tried with NULL and it works.
Un saludo,
Pablo Espinar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-06-2024 11:31 AM
To add to this, NULL needs to be a string like so:
var list = new GlideRecord("incident");
list.addEncodedQuery("cmdb_ci=some_sys_id");
list.cmdb_ci = 'NULL';
list.updateMultiple();
Thanks for the help 6 years in the future 🙂