Quintiq file version 2.0
#parent: PanelOptimizerGoalsButtonsAllH/ButtonAssignAll
Response OnClick () id:Response_PanelOptimizerGoalsButtonsAllH_ButtonAssignAll_OnClick
{
  #keys: '[146140.1.1762223386]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebButton_OnClick'
  QuillAction
  {
    Body:
    [*
      // Activate all kpi weights as goal
      maxlevel := max( DataHolderKPIs.Data(), Elements, weight, weight.Level() );
      kpiweights := selectset( DataHolderDialogData.Data(), KPIWeight, kpi, kpi.Level() = 0 and kpi.KPI().IsUsedByOptimizer() );
      
      Form.ActivateKPIWeight( kpiweights, ifexpr( maxlevel < 1, 1, maxlevel ) );
    *]
    GroupServerCalls: false
  }
}
