Auto- Populate service level field based on selection of affected CI on Incident table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2025 01:17 AM
Hi All,
Want to populate custom field (u_service_level) based on selection of affected ci reference to cmdb_ci table.
Thank you in advance
Best regards
Deepika

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2025 01:29 AM
Hello @deepikagang
Are you storing the Service Level value in CMDB CI record? if yes, then you can create onchange client script on the change of affected CI, then call a script include through GlideAjax, query the CI record and get the service level value and return the same to client. In client script you can populate the answer from Service to the Service Level field.
Below threads shows example scripts for assignment group, you can have similar script for your service level field.
https://www.servicenow.com/community/developer-forum/auto-populate-assignment-group/m-p/2343293
Thank you,
Ali
Thank you,
Ali
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2025 02:04 AM
Thank you @Ahmmed Ali for your reply.
I tried but no luck. Can you please help me with the correct code.
Note: service level field is custom field on cmdb_ci_service table and we made visible on incident form.
Below are my script include and client script:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2025 02:08 AM
the field in your screenshot is dot walked from Support Service.
Why are you setting it via script?
That's not the correct way to set.
Ideally it will auto populate based on Support service selected on form
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2025 02:35 AM
Hello @deepikagang
First issue is you have dot walked field on the incident table. Ideally if you want to show the field from affected CI record, you can simply add dot walked "Service Level" field from the affected CI field, which should show backend name as cmdb_ci.u_service_level. Now when new CI is selected, your service level will auto-populate.
BUT
If you want to have the Service Level field created in incident (which should be good to keep historical data. means the support level of CI can be changed any time and for past incidents as well it will show new value if dot walked which will be wrong as per my understanding).
Now, create new field in incident table called Support Level. In above script include change return gr.u_service_level; to return gr.u_service_level.toString(); and update your custom field in client script set value statement.
Thank you,
Ali
Thank you,
Ali