IBM Support

Using the Case List widget to display related cases

Technical Blog Post


Using the Case List widget to display related cases


Have you ever wanted to display a list of other cases associated with a particular customer? Here's how you can do this without custom coding (ok, just a little JavaScript - but you can just copy/paste that!).

The example below is for IBM Case Manager 5.0 (really old!), if you want to see how to do this in ICM 5.2, check out this article.


In this example we are going to add the Case List widget to our Work page. When the user clicks on a row in an In-basket, we are going to display all cases related to customer whose name is associated with the work.

  • Add the Case List widget to your Work page
  • Add the Case Search widget
  • Add the Script Adapter widget
  • Add the Event Explorer widget
  • Wire the Event Explorer widget to the Case Search widget's Search Cases as CaseSearch event
  • Using the Advanced Search of the Case Search widget, perform a search on the property you are going to use as your search key
  • You will see the search payload appear in the Event Explorer widget
  • Highlight over the payload text in the Event Explorer and copy it
  • Edit settings on the JavaScript adapter widget and enter the following:
theEvent = paste_your_event_payload_here;
return theEvent;
  • Edit the query text line to look like this:
"QuerySQL": "SELECT * FROM CCDM_ManageDisputeItem WHERE (CCDM_CustomerName = '" + payload + "' AND CmAcmCaseState = 2) "
  • Wire the In-basket Column your_column_name selected as Any Data to the JavaScript Adapter
  • Wire the JavaScript Adapter to the Case List widget

How this works
The key to this is the fact that the Case List widget gets its entire search and display information from an inbound event. Typically, the Case Search widget wires that in when you enter something in and click the Search button.

When you select a row in the in-basket, the send column event passes the value of item at that row/column. That value becomes the inbound payload for the JavaScript Adapter and is concatenated into the event payload before it is returned out of the widget and passed to the Case List.

Update. Turns out the payload sent from the search includes the current target object store name. This fine until you try deploying to a different target. To fix this, instead of this line:

"ObjectStore" : "Your_TOS_Name"

use this:

"ObjectStore" : ecmwdgt.getBean("spaceConfig").getTargetOS()

as described in the tip Accessing Case Manager Settings.

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSCTJ4","label":"Case Manager"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":""}]