The field value is visible in the form but not in list/activity log/show xml
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Based on our requirement the service will be updated based on circuit id and product group will be updated based on service. Both logic are written in an client script. And the client script is working and I can see the values getting updated in the respective field.
But when I see the same field value in list it is empty, and there is no activity log for that field change and when i click on show xml also it is not there. Once I explicitly save the incident record again then only all are getting synced.
Why this behaving like this? Can anyone help me resolving this issue?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Hi @RohitN244878896 ,
Can u tell us what type of client script it is? if its an onLoad or onChange script then on the form it will show the value but it wont get saved into the database as client scripts works on front end. In order to save it to the database u need to save it in the client script explicitly. If possible pls share the client script logic as well.
Thanks,
Danish Bhairagdar
Thanks,
Danish Bhairagdar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
1. In Native UI -> go to form layout and check if the field is dot walking field. If yes,
The issue can happen because ServiceNow Client Scripts cannot directly save changes to dot-walked fields belonging to a different table. When you modify a dot-walked field via a Client Script, the value is updated on the screen, but clicking "Save" on the Incident record only updates the Incident table itself. The parent record containing that dot-walked field remains untouched until you forcefully interact with it.
2. If your logic runs on an onLoad client Script, it will visually populate the field every time you open the form, but it will never save to the list view unless a user explicitly saves the record.
If you are trying to save any value at client level, try to let the server handle it using a Before Insert/Update Business Rule.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @RohitN244878896,
Use Business Rules - Before (Insert/Update) it will work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Hello @RohitN244878896 , This is expected behavior. Show XML and List View searches fetch data directly from the server-side database.
In contrast, Client Scripts run entirely within the user's browser (client side). Any changes made on the form—whether by the user or by a Client Script—exist only in the browser's temporary memory. They are not written to the database until the user explicitly saves or submits the form.
Imagine the performance impact if ServiceNow saved every client-side update instantly. Because users frequently change their minds or modify fields multiple times before saving, constant automated saving would create unnecessary server load and clutter the audit history.
Since your record saves with the correct final values, your logic is working exactly as intended and no modifications are needed, in my view.
Regards,
Nishant