Quintiq file version 2.0
#parent: #root
Method EnableDisableNewSet () id:Method_DialogExportPlannedOrder_EnableDisableNewSet
{
  #keys: '[145730.0.1342181346]'
  Body:
  [*
    // Activate edit field new set and append name
    
    isToggle := CheckboxNewSet.Checked();
    
    DropDownListExistingSet.Enabled( not isToggle, '' );
    EditFieldNewSet.Enabled( isToggle, '' );
    
    // If empty, set to default name with timestamp
    if(  EditFieldNewSet.Text().TrimBoth() = '' and isToggle )
    {
      
      EditFieldNewSet.Text( MacroPlan::GetMPSPlanID( MacroPlan, DateTime::ActualTime() ) );
      
    }
    else
    {
      
      EditFieldNewSet.Text('');
      
    }
  *]
}
