• Add a Comment
  • Edit
  • More Actions v
  • Quarantine this Entry

Comments (13)

1 Fred Abou Jawad commented Permalink

Thanks for this, really useful in getting some clarity around this topic. Getting the columns I want to display has been most troubling in this area.

2 marceln commented Permalink

Thanks, I was working on this before this blog post and had to figure it out myself. Now the comment about case specific properties is interesting , I am going to try it out. Also I would like to set up a filtering on a multivalued property. E.g. I would like to create a property which will list users with access to a specific case, and then the case will be displayed to those users. I guess this should not be a problem.

3 marceln commented Permalink

Thanks, I was working on this before this blog post and had to figure it out myself. Now the comment about case specific properties is interesting , I am going to try it out. Also I would like to set up a filtering on a multivalued property. E.g. I would like to create a property which will list users with access to a specific case, and then the case will be displayed to those users. I guess this should not be a problem.

4 marceln commented Permalink

Thanks, I was working on this before this blog post and had to figure it out myself. Now the comment about case specific properties is interesting , I am going to try it out. Also I would like to set up a filtering on a multivalued property. E.g. I would like to create a property which will list users with access to a specific case, and then the case will be displayed to those users. I guess this should not be a problem.

5 marceln commented Permalink

Thanks, I was working on this before this blog post and had to figure it out myself. Now the comment about case specific properties is interesting , I am going to try it out. Also I would like to set up a filtering on a multivalued property. E.g. I would like to create a property which will list users with access to a specific case, and then the case will be displayed to those users. I guess this should not be a problem.

6 juliabailey commented Trackback

Hi, Dave, can I use the case list widget on a work details page to display a list of related case? (based on case properties)

7 Dave Perman commented Permalink

For sure. The Case List widget can be used on any page you want. Just pass it the appropriate search and you good to go!

8 SPSol commented Permalink

Hi Dave, <br /> Thanks for this sample code its really helpful. <br /> We are doing an upgrade project here in NZ from IBM Case Manager 5.1 to 5.2. <br /> As in our 5.1 project we have multiple case list widgets on Case Details and Work Details page. <div>&nbsp;</div> So when we are trying to use above solution it will not work for our scenario because whenever the broadcast event is kicked off then latest search will come up in all case list widget we need to perform separate search for each case list widget on a same Case Details page to display distinct related cases. <div>&nbsp;</div> can you please suggest something for this scenario. <div>&nbsp;</div> More Details <div>&nbsp;</div> We are trying to build related cases widget using Case List widget on Case details and Work Detailas pages. <br /> In 5.1 we use to make this related cases widget using below mentioned process <div>&nbsp;</div> Command Widget ----Send Case Information (Event)--Script Adaptor---Related Case List Widget --Search Cases Event. <div>&nbsp;</div> Script Adaptor Code used: <div>&nbsp;</div> this._enabler = com.ibm.mashups.enabler; <br /> this._navStateModel = this._enabler.model.state.NavigationStateModelFactory.getNavigationStateModel(); <br /> this._spaceAccessor = this._enabler.model.state.AccessorFactory.getSpaceAccessor(this._navStateModel); <br /> this.spaceModel = com.ibm.mashups.enabler.space.Factory.getSpaceModel(); <br /> var currentSpaceID = this._spaceAccessor.getSpaceID(); <br /> var currentSpaceNode = this.spaceModel.find(currentSpaceID).start(); <br /> var atos = currentSpaceNode.getMetaData("com.ibm.acm.SolutionTargetOS"); <br /> console.log("atos="+atos); <br /> theSearch= { "CaseType": "", "ObjectStore": atos, "SortingProperties": [ { "symbolicName": "CmAcmCaseIdentifier", "type": "string", "displayName": "Case ID" }, { "symbolicName": "cmis:lastModifiedBy", "type": "string", "displayName": "Modified By" }, { "symbolicName": "cmis:lastModificationDate", "type": "datetime", "displayName": "Date Modified" } ], "SystemProperties": [ { "symbolicName": "p8ext:ClassDisplayName", "type": "string", "displayName": "Case Type" }, { "symbolicName": "cmis:lastModifiedBy", "type": "string", "displayName": "Modified By" }, { "symbolicName": "CmAcmCaseState", "type": "string", "displayName": "Case State" }, { "symbolicName": "cmis:lastModificationDate", "type": "datetime", "displayName": "Date Modified" } ], "SearchProperties": [ { "symbolicName": "CmAcmCaseState", "displayName": "Case State", "type": "integer" } ], "SummaryProperties": null, "QuerySQL": "SELECT * FROM PRMS_RegulatoryInstrument WHERE ( PRMS_LECaseID = '"+payload.caseInfo.caseData.CmAcmCaseIdentifier.value+"') " }; return theSearch; <div>&nbsp;</div> <div>&nbsp;</div> In 5.2 We are able to do this only for one case list widget as the Case List Widget becomes more than one Case List stop working. <br /> Process Followed as of now: <br /> Script adaptor 1 Wiring: <div>&nbsp;</div> <div>&nbsp;</div>   <br /> Script Adaptor 2 Wiring: <div>&nbsp;</div> <div>&nbsp;</div> Script Adaptor 1 Code: <br /> var solution = this.solution; <br /> var params = {}; <br /> var self = this; <br /> params.ObjectStore = solution.getTargetOS().id; <br /> params.CaseType = solution.getPrefix()+"_LegalEntity"; <br /> params.solution = solution; <div>&nbsp;</div> params.ceQuery = "SELECT t.[FolderName], t.[LastModifier], t.[DateLastModified], t.[CmAcmCaseTypeFolder], t.[CmAcmCaseState], t.[CmAcmCaseIdentifier], t.[DateCreated], t.[Creator], t.[Id], t.[ContainerType], t.[LockToken], t.[LockTimeout], t.[ClassDescription], t.[DateLastModified], t.[FolderName] FROM [PRMS_LegalEntity] t WHERE (t.[CmAcmCaseIdentifier] LIKE '"+payload.caseEditable.propertiesCollection.PRMS_LECaseID.value+"' ) ORDER BY t.[CmAcmCaseIdentifier]"; <div>&nbsp;</div> <div>&nbsp;</div> <div>&nbsp;</div> var searchPayload = new icm.util.SearchPayload(); <br /> searchPayload.setModel(params); <br /> searchPayload.getSearchPayload(dojo.hitch(self, function(payload) { <br /> self.onBroadcastEvent("icm.SearchCases", payload); <br /> })); <div>&nbsp;</div> Script Adaptor 2 Code: <div>&nbsp;</div> <div>&nbsp;</div> var solution = this.solution; <br /> var params = {}; <br /> var self = this; <br /> params.ObjectStore = solution.getTargetOS().id; <br /> params.CaseType = solution.getPrefix()+"_LegalEntity"; <br /> params.solution = solution; <div>&nbsp;</div> params.ceQuery = "SELECT t.[FolderName], t.[LastModifier], t.[DateLastModified], t.[CmAcmCaseTypeFolder], t.[CmAcmCaseState], t.[CmAcmCaseIdentifier], t.[DateCreated], t.[Creator], t.[Id], t.[ContainerType], t.[LockToken], t.[LockTimeout], t.[ClassDescription], t.[DateLastModified], t.[FolderName] FROM [PRMS_Premises] t WHERE (t.[PRMS_RICaseID] LIKE '"+payload.caseEditable.propertiesCollection.CmAcmCaseIdentifier.value+"' ) ORDER BY t.[CmAcmCaseIdentifier]"; <br /> var searchPayload = new icm.util.SearchPayload(); <br /> searchPayload.setModel(params); <br /> searchPayload.getSearchPayload(dojo.hitch(self, function(payload) { <br /> self.onBroadcastEvent("icm.SendCaseInfo", payload); <br /> })); <div>&nbsp;</div> Please do suggest us how to make this two widgets working simultaneously. <br /> Thank You <br /> Regards <br /> Pankaj Singh

9 Dave Perman commented Permalink

I had just recently modified a version of this to always filter the case list results with cases where the current user is the "case owner" (a property on the case). <div>&nbsp;</div> Since I want my filter applied no matter how the case list gets updated (page load, refresh button added to case toolbar, or search) I had the same issue with the broadcast events. <div>&nbsp;</div> The solution is to go to the widget settings on the search widget, go to the Events tab, and disable the search broadcast event. When you do that, you need to remember to manually wire it back up, which in my example, was through my Script Adapter that injected the additional filter criteria.

10 SPSol commented Permalink

Hi Dave, <div>&nbsp;</div> Thanks for your reply to disable the search broadcast event. <br /> But in case of multiple case list widget Even though one of them fire the manual broadcast event of serachcase the next one will override the first one . <div>&nbsp;</div> Can you please have a look at my previous comment that explains the project problem very clearly. <div>&nbsp;</div> Regards <br /> Pankaj

Add a Comment Add a Comment