More than 1 Listing for a KPI
I have a DeepSee KPI defined based on %DeepSee.KPI following the documentation http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=.... I've then enabled the KPI on a dashboard by adding a Widget where the data source is the KPI. Currently the ability to show a Detail Listing is implemented by the call back
pListingName is the name of the listing to display. This is reserved for future use.
According to this and from what I can tell there is no way to provide support for a secondary listing.
- Is this true? I'm looking at
Cache for Windows (x86-64) 2016.3 (Build 619U) - Can this be changed so that in the future multiple Listings can be defined? I'm thinking it might make sense to support something like
XData KPI [ XMLNamespace = "http://www.intersystems.com/deepsee/kpi" ]
{
<kpi xmlns="http://www.intersystems.com/deepsee/kpi" name="ED Patient Utilization" sourceType="sql" >
<property/>
<filter />
<action/>
<listing name="Default".../>
<listing name="Detail".../>
</kpi>
}
Currently, there is a workaround to accomplish this desired behavior without needing this parameter to be implemented. You can add a "listing" filter to your KPI (implemented on a widget) and then inside of %OnGetListingSQL, you can assign different SQL based on the filter value.
XData:
<filter name="Listing" valueList="listing1,listing2"/>
%OnGetListingSQL:
set tSQL="SELECT <column list 1> from <table>"
} else {
set tSQL="SELECT <column list 2> from <table>"
}
Thanks, that is one way to do it. Might this be something that is fixed more formally in the future?