Technical Blog Post
Abstract
Quick Data Lookups Revisited
Body
A long while ago, I added a blog entry that described how to use widget wiring and a script adapter to do quick data lookups in IBM Case Manager 5.0. One of our readers asked how you do a similar thing in ICM 5.2. Although very similar, the format of the payload for the event has changed.
- Add a Script Adapter to a page that has the Properties Widget
- Wire the inbound event of the Script Adapter to the Field Updated outbound event of the Properties Widget
- Wire the outbound event of the Script Adapter back to the Properties Widget's Update Field event
var solnPrefix = this.solution.getPrefix(); if (payload.change.id == solnPrefix+'_ClientID') if (payload.change.value == '123-12345') return {'changes':[{'id':solnPrefix+'_ClientName','value':'Dave Perman'},{'id':solnPrefix+'_ClientValidation','value':'On File - Approved'}]}; else return {'changes':[{'id':solnPrefix+'_ClientValidation','value':'pending'}]}; else return {};
[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSCTJ4","label":"IBM Case Manager"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]
UID
ibm11281286