ITSM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2024 02:55 AM - edited 01-05-2024 03:54 AM
Hi all,
I want to know how can I clear the value of a field which is a "List" type field. I'm writing a Business rule to inherit one field to other.
I am stuck at : how shall I clear the field values.
Please refer screenshot. The field function(type=list) is a read only field having some value..
Below is the code snippet:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2024 03:06 AM
In the Business Rule script try:
current.u_function = '';
where u_function is the field name.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2024 03:55 AM
Hi Bowman Thanks for your response. I have already used it still it didn't work.
I have updated my question by the methods i have already tried.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2024 05:26 AM
It looks like you are trying to dot-walk to this field from the current record/table? That's not going to work - you'll have to do a GlideRecord from the current record to lookup the record on the other table before updating that field. What table is the Business Rule running on? What table is the u_function field on?
Other things to consider - are you certain the Business Rule is getting triggered - are you getting the info message? What are the When to run parameters - before or after, insert, update,...? Any Filter conditions or Condition on the Advanced tab?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2024 05:44 AM - edited 01-05-2024 05:45 AM
Hello @vikas48 ,
Refer below script just modify it as per your requirment.
var incidentGR = new GlideRecord('incident');
incidentGR.addQuery('sys_id','ed92e8d173d023002728660c4cf6a7bc');
incidentGR.query();
if(incidentGR.next()){
incidentGR.watch_list="";
incidentGR.update();
}
Kindly mark Correct and Helpful if applicable