Quintiq file version 2.0 
 | 
#parent: PanelButton/ButtonRecordNow 
 | 
Response OnClick () id:Response_PanelButton_ButtonRecordNow_OnClick 
 | 
{ 
 | 
  #keys: '[146874.1.152949734]' 
 | 
  CanBindMultiple: false 
 | 
  DefinitionID: 'Responsedef_WebButton_OnClick' 
 | 
  Precondition: 
 | 
  [* 
 | 
    return GlobalStateKpiTracker.CheckActiveSnapshotGenerator( DataHolderSnapshotGenerator.Data() ); 
 | 
  *] 
 | 
  QuillAction 
 | 
  { 
 | 
    Body: 
 | 
    [* 
 | 
      // Save the changed value and send the snapshot 
 | 
       
 | 
      /*  
 | 
      1. ApplyChanges method is not available in Panel. 
 | 
      2. Manually assign the changed value back to DataHolder 
 | 
      */ 
 | 
      DataHolderSnapshotGenerator.Data().RetentionPeriod( DropDownStringListRetentionPolicy.Text() ); 
 | 
      DataHolderSnapshotGenerator.Data().Frequency( DurationSelectorFrequency.Duration() ); 
 | 
      DataHolderSnapshotGenerator.Data().LastRecordTimestamp( DateTimeSelectorStartTime.DateTime() ); 
 | 
      DataHolderSnapshotGenerator.Data().Description( EditorDescription.Text() ); 
 | 
       
 | 
      DataHolderSnapshotGenerator.Data().Commit(); 
 | 
       
 | 
      // Send the snapshot immediately. 
 | 
      DataHolderSnapshotGenerator.Data().WrappedInstance().SendSnapshot(); 
 | 
       
 | 
      // Also set the latest timestamp to the start time. 
 | 
      DateTimeSelectorStartTime.DateTime( DateTime::Now() ); 
 | 
       
 | 
      // Just to be sure, also set the time to the real instance. 
 | 
      DataHolderSnapshotGenerator.Data().WrappedInstance().LastRecordTimestamp( DateTime::Now() ); 
 | 
    *] 
 | 
    GroupServerCalls: false 
 | 
  } 
 | 
} 
 |