- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2015 03:01 AM
I have a list view and would like to change one column after editing another. For example, in an incidents view, I might want to clear the User when the User Group changes to ensure the person editing the list assigns a new user to the incident. I have already done this in a form using g_form.setValue('column_name', '') in the onChange function, but in a list I would need to pick the selected row, I'm guessing using the table variable in the onCellEdit function? I imagine I can write script includes or business rules but this feels like it should be quite straightforward to do.
This does not work (perhaps I'm using the wrong column_name?):
function onCellEdit(sysIDs, table, oldValues, newValue, callback) {
g_form.setValue('column_name', '');
callback(true);
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2015 03:55 AM
I don't think this question is likely to get a reply that directly answers the question because the documentation is not clear on the matter and it is becoming stale now. The replies so far have either indicated alternative solutions or have hinted that it might not be possible without being definitive. I have myself found an alternative solution to my problem but the question remains unanswered. I will try to close it now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2015 05:24 AM
I think you would have to clear it on an before Business Rule, when group changes, clear assigned to.
Or you can use a quickform with a list edit UI Action and have the form pop up to prompt for a change of user:
» How to Display an Update Form in Service-now using GlideDialogWindow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2015 10:38 AM
Hi Mike
In my simple case, I just need to set the value to blank, so don't need a pop-up form.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2015 03:55 AM
I don't think this question is likely to get a reply that directly answers the question because the documentation is not clear on the matter and it is becoming stale now. The replies so far have either indicated alternative solutions or have hinted that it might not be possible without being definitive. I have myself found an alternative solution to my problem but the question remains unanswered. I will try to close it now.