Quintiq file version 2.0
#parent: MatrixEditorTransitionMatrix
Response OnCreateValue (
  CampaignType_MP row,
  CampaignType_MP column,
  Duration value
) id:Response_MatrixEditorTransitionMatrix_OnCreateValue
{
  #keys: '[143600.0.1309781672]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebMatrixEditor_OnCreateValue'
  GroupServerCalls: true
  Precondition:
  [*
    return TransitionType_MP::CanCreate( feedback, DataHolderUnit.Data(), row.Name(), column.Name() )
  *]
  QuillAction
  {
    Body:
    [*
      // Check input is valid, then create transition type based on input min duration
      feedback := '';
      sanityfb := '';
      isValid := TransitionType_MP::ValidateInput( feedback, sanityfb, row.Unit(),
                                                   row, column, 0.0, 0.0, value, Duration::Zero(),
                                                   null( TransitionType_MP ), true, // check unique
                                                   GlobalParameters_MP::GetCampaignTransitionsTypeDuration(),
                                                   false, false /*false has max quantity/duration*/);                                 
      if( isValid )
      {
        TransitionType_MP::Create( column.Unit(),
                                   0.0, 0.0, value, Duration::Zero(),
                                   row, column, false, false,
                                   false );
      }
      else
      {
        WebMessageBox::Warning( this, feedback, Translations::MessageBox_OK() );
      }
    *]
  }
}
