- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2023 10:37 PM
In problem form we have created a new cmdb_ci extended outage related list. I have also created a custom field in outage table which is referencing the problem table.
I have requirement, I wanted to auto-populate the problem number in the custom problem field when we are creating a outage record from related list.
Can anyone please help me how to achieve this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2023 11:55 PM
Hi @Saurav Bhardwa2 , It should auto populate if you have mapped Problem sys_id (Parent) to Outage record at the time of creation of Problem>Outage relationship.
Here I have mapped Task_Number with Parent Sys_ID, then Problem number is auto populated in Task number field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2023 11:55 PM
Hi @Saurav Bhardwa2 , It should auto populate if you have mapped Problem sys_id (Parent) to Outage record at the time of creation of Problem>Outage relationship.
Here I have mapped Task_Number with Parent Sys_ID, then Problem number is auto populated in Task number field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2023 12:36 AM
Thank you @Pravindra1, that worked
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2023 10:14 AM
Hey @Pravindra1 , I want to set the begin and end date as well, which are mapped with other problem table fields. When I am mapping those, it was removing the whole related list from the outage related list in problem form. I have tried setValue, but it was not working in relationship script.
Is there a wat to achieve this from Relationship script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2023 10:41 PM
Hi @Saurav Bhardwa2 , Other fields cannot be populated from relationship script.
As Problem Sys_Id is populated on Outage form, you can write OnLoad Client script on 'cmdb_outage' table to populate other fields from problem record.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2023 12:11 AM - edited 06-02-2023 12:12 AM
Hi,
You can implement this by creating a Relationship.
Applies to table: Problem
Queries from table: Outage
Query with: