- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2018 03:40 AM
Hi,
I would like to show the incident record under one of the related list on the knowledge form on which i have selected one KB article from the related search results document and marked as this helped.
For example in the below image 1) I am choosing one KB Article from the "Related Search Results" tab and select "preview" and marked that as "This Helped".
2)After the saving the Incident form I want that incident which has been marked only as "This Helped" to be displayed under the knowledge form in one of the custom relationship i created. I tried myself by creating custom relationship and applied to "Knowledge" Table and queried from "cxs_relevant_doc_task" relevant knowledge task table to achieve this. This is how it looked:
3) This brought me all the incidents tagged as "This Helped" under that related list on the knowledge form. Refer the image below:
4. As mentioned in the beginning I want only those specific Incident records under 1 knowledge article on which it has been marked as "This Helped" should be displayed under the related list. I don't know how to query further to achieve this.
Looking for help!
Solved! Go to Solution.
- Labels:
-
Knowledge Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2018 06:10 AM
You're close, but I think your 'Relationship' record in step 2 is probably querying from the wrong table. This should get you what you need.
1) Change your 'Queries from table' value to query from the 'Relevant document detail [cxs_rel_doc_detail]' table.
2) Use this for your 'Query with' script
(function refineQuery(current, parent) {
// Query for relevant docs
current.addQuery('relevance', 'This helped');
current.addQuery('relevant_doc', parent.sys_id);
current.addNotNullQuery('relevant_doc');
})(current, parent);
3) Configure your related list layout to include the 'Relevant Document.Relevant To' field and remove anything else you don't need. You should end up with something that looks like this.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2018 06:10 AM
You're close, but I think your 'Relationship' record in step 2 is probably querying from the wrong table. This should get you what you need.
1) Change your 'Queries from table' value to query from the 'Relevant document detail [cxs_rel_doc_detail]' table.
2) Use this for your 'Query with' script
(function refineQuery(current, parent) {
// Query for relevant docs
current.addQuery('relevance', 'This helped');
current.addQuery('relevant_doc', parent.sys_id);
current.addNotNullQuery('relevant_doc');
})(current, parent);
3) Configure your related list layout to include the 'Relevant Document.Relevant To' field and remove anything else you don't need. You should end up with something that looks like this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2018 08:27 AM
Thank you so much Mark. Also feeling so grateful for your reply on this.
Thanks again

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2018 09:24 AM
You're welcome!