How to add affected locations related list under incident?

BijoyDeb
Tera Contributor

Hi All,

 

I have a requirement to get the locations from the child incidents and then populate those under the related list named Affected Locations in parent incident.

Do i need to replicate same behavior as Affected CI's which we have on change table?

 

Please let me know how i can do this.

 

Thanks in advance!

 

1 ACCEPTED SOLUTION

Hi @BijoyDeb,

 

You dont need any field to store that info. When an incident is created it already has called.location info which can be accessed by dot walking into the incident caller field. hence you dont need any additional field.

 

Follow the steps give above, in the script field you can dot walk in to incident > caller.location to access the location. (The magic is in the query filter that you apply)

 

See the example below :

 

1) Go to 'List layout'

SohailKhilji_0-1708839947100.png

 

 

2) Do dot walking of caller field, in my case it is caller in your case it is affected user.

SohailKhilji_1-1708839947119.png

 

3) Add 'Caller.location' field by doing dot walking and click Save

SohailKhilji_2-1708839947072.png

 

4) If you don't see field by default then click on 'Settings' icon

SohailKhilji_3-1708839947624.png

 

5) Click on 'reset to column default' and click save then field will appear.

SohailKhilji_4-1708839947126.png

 

I hope this helps...

 


☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....

LinkedIn - Lets Connect

View solution in original post

4 REPLIES 4

Sohail Khilji
Kilo Patron
Kilo Patron

Hi @BijoyDeb ,

 

There can be 2 things, do you need the affected locations of the callers of child incidents or the CIs ?

 

 

1.To create a affected location related list, navigate to 'realtionship' module from the navigation.

2.Click on create new.

- provide the name as > Affected Location 

3. In the apples to table select incident table

4. In quries to table select cmn_location.

5. In the script field add a query to filter the list to show the affected locations of child incidents.

6. Save the record.

7. Move to incident form > configure> realted list. 

Add the realted list which you created from the slush bucket and save.

 

I hope this helps..


☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....

LinkedIn - Lets Connect

Thanks @Sohail Khilji ,

I want child incidents caller's location to be shown in related list.

I got that we need to created relationship record

But there isn't any field on location to store for what incident it is and that i can relate to parent incident, right?

There i've stuck as of now

Hi @BijoyDeb,

 

You dont need any field to store that info. When an incident is created it already has called.location info which can be accessed by dot walking into the incident caller field. hence you dont need any additional field.

 

Follow the steps give above, in the script field you can dot walk in to incident > caller.location to access the location. (The magic is in the query filter that you apply)

 

See the example below :

 

1) Go to 'List layout'

SohailKhilji_0-1708839947100.png

 

 

2) Do dot walking of caller field, in my case it is caller in your case it is affected user.

SohailKhilji_1-1708839947119.png

 

3) Add 'Caller.location' field by doing dot walking and click Save

SohailKhilji_2-1708839947072.png

 

4) If you don't see field by default then click on 'Settings' icon

SohailKhilji_3-1708839947624.png

 

5) Click on 'reset to column default' and click save then field will appear.

SohailKhilji_4-1708839947126.png

 

I hope this helps...

 


☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....

LinkedIn - Lets Connect

Ayushi12
Mega Sage

Hi @BijoyDeb,
Any two tables that can have a logical relationship can appear as a parent/child pair via a related list.Every related list requires a relationship record.

  • Click System Definition -- Relationships.
  • Click New.
  • Specify the relationship record fields.
  • Click Submit.

Refer:https://docs.servicenow.com/bundle/washingtondc-platform-user-interface/page/administer/form-adminis...

Please mark this response as correct or helpful if it assisted you with your question.