Lai,Risheng
2023-11-02 30c02e0c981b16be0918483543f4b812956c45d4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Quintiq file version 2.0
#parent: #root
Method FilterDataOnSelectedKpis (
  structured[KpiMetaData] filterKpis,
  KpiLabel series,
  Boolean isLastSnapshotChecked
) as String id:Method_GlobalStateKpiTracker_FilterDataOnSelectedKpis
{
  #keys: '[146874.0.1589191753]'
  Body:
  [*
    // Sets the filter on the KpiValues list to match the selected KPIs and the
    // LastSnapshotOnly checkbox.
    filter := "";
    
    if( not isnull( filterKpis ) and filterKpis.Size() > 0 )
    {
      filter := "( " + this.GenerateFilterFromKpiSelection( filterKpis ) + " )";
    
      if ( isLastSnapshotChecked and not isnull( series ) )
      {
        filter := filter + " and ( object.UI_IsLast() )";
      }
      debuginfo(' >>> Setting list filter to ' , filter );
    }
    
    return filter;
  *]
}