Quintiq file version 2.0
#parent: PanelOptimizerGoalsButtonsSingleH_111/ButtonAssign
Response OnClick (
  structured[shadow[KPIWeight]] selection
) id:Response_PanelOptimizerGoalsButtonsSingleH_111_ButtonAssign_OnClick
{
  #keys: '[146140.1.1759396344]'
  CanBindMultiple: false
  DefinitionID => /PanelOptimizerGoalsButtonsSingleH_111/Responsedef_PanelOptimizerGoalsButtonsSingleH_111_ButtonAssign_WebButton_OnClick
  Initiator: 'ButtonAssign'
  QuillAction
  {
    Body:
    [*
      // Activate kpi weights as goal
      
      // Get the maximum level of the activegoals
      maxlevel := max( DataHolderKPIs.Data(), Elements, weight, weight.Level() );
      
      Form.ActivateKPIWeight( selection, ifexpr( maxlevel < 1, 1, maxlevel ) );
    *]
    GroupServerCalls: false
  }
}
