Origin: String;
The Origin property returns the key of the object that initializes changes in the matrix with loaded source data.
Cube data can be changed by the Interactive Data Entry Forms and Calculation Algorithms extensions:
If cube data was changed manually in data entry form table area cells, the property contain the key of this data entry form.
If cube data was changed automatically in data entry form table area cells on algorithm calculation, the property contains the key of this data entry form and calculation algorithm.
If cube data was changed automatically on algorithm calculation, the property contain the key of this calculation algorithm.
The key of the object that initiates data change can be obtained only via the cube data save handler connected to the cube. To connect the handler, use the IStandardCube.SetDefaultCallback property.
The example of the cube data save handler with the use of the ICubeCallbackSaveArgument.Origin property:
Public Class CubeSaveCallBack: CubeCallBack
// Handle the event that occurs before cube saving
Sub OnBeforeSave(callbackSaveArg: ICubeCallbackBeforeSaveArgument);
Begin
//...
Debug.WriteLine("Event that occurs before cube saving is executed");
End Sub OnBeforeSave;
// Handle the event that occurs after cube data saving
Sub OnAfterSave(callbackSaveArg: ICubeCallbackSaveArgument);
Begin
Debug.WriteLine("Key of the object that changed cube data: " + callbackSaveArg.Origin);
Debug.WriteLine("Event that occurs after cube saving is executed");
End Sub OnAfterSave;
End Class CubeSaveCallBack;
After executing the example the key of the object was obtained that changed cube data on its saving.
See also: