How to auto populate configuration item field in incident form?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2024 06:32 AM
How to auto populate configuration item field in incident form when 'xyz' option is selected from category choice field (reference). The configuration item field should display one (asset assigned first to user) of the many asset numbers assigned to user.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2024 02:41 PM
Hi @Nitin21 ,
First you need to share the mapping approach of category/subcategory with CI.
As you know, category/sub-category on incident from configured in Choice [ sys_choice ] table , once it's selected , we have back-end value, now use this value to find the CI from the mapping source.
So logic/code is entirely depend on mapping source, if using cmdb_ci's category/sub-category column for this mapping then, you can use the approach shared by @Sumanth16.
-Thanks,
AshishKM
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2024 07:16 AM
Hi @Nitin21 ,
The CI field on incident table comes from Task table. So you need to do dictionary Override and CI field is dependent on Company field in task table. you need to change this dependent to Service Offering field. Refer below screenshot to do the change.
Your reference qualifier will be like below
javascript:new getDate().getCis(current.service_offering); // new ScriptIncludeName().functionName(current.service_offering);
then create a script include
Script:
If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!
Thanks & Regards,
Sumanth Meda
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2024 07:23 AM
Thank you, I'm struggling to understand this but could you please reupload that pic with better resolution. Even after zooming, can't deduce anything.