How do I create a related list for the INC/PRB table?

matthew_magee1
Giga Guru

SN Community-

I've been thrown into the world of PRB/CHG/INC tickets.

One task that was asked is:

Please create a related list on the INC which shows the associated PRB.

Now there is already a field under Related Records for the problem:

Capture.PNG

This is sufficient, BUT the customer would like a related list tab showing the same problem.

I started off by creating a Relationship

Applies to table: Incident

Queries from table: Problem

Queries with: current.addQuery(sys_id, parent.problem_id);

When I add this related list to the Incident form, I do get the associate problem with the INC, but I also get ALL problems, not just the one associated with the parent INC

I'm guessing the Queries with statement is incorrect.

Am I close to getting what I need?

Note: the variable 'problem_id' on the INC form is a reference field to the Problem table. I thought by getting the sys_id (parent.problem_id) and matching it with the sys_id of the problem, I'd get the result I need

Any help is greatly appreciated-

1 ACCEPTED SOLUTION

Mike Allen
Mega Sage

Your addQuery has no ticks:



current.addQuery('sys_id', parent.problem_id);


View solution in original post

6 REPLIES 6

Mike Allen
Mega Sage

There should be an OOB related list that cover this:



find_real_file.png


Hey Mike,



I added that related list via the slush bucket but i'm not getting any results as seen below. I dbl checked to see if there was a value in 'Related Records>Problem' as seen in the original posting, and there is still a PRM associated with the INC. The relationship i created worked great so I'll go with that for now.



Thanks much-



Capture.PNG


Mike Allen
Mega Sage

Your addQuery has no ticks:



current.addQuery('sys_id', parent.problem_id);


Yep, user error. Thanks Mike for seeing that. I'll also look for that OOB related list