EphemeralFacts: Boolean;
The EphemeralFacts property determines whether to create new series with an indicator of deletion.
EphemeralFacts is used if validation includes in calculation non-existing but possible rows.
Available values:
True. New rows are created with indicator of deletion. The IValidationExecRun.Revision property value must be indicated.
False. Default value. New rows are created without indicator of deletion.
Executing the example requires that the repository contains a time series database with the FC_COMM identifier that contains validation calculation with the 19 key.
Also, add links to the Cubes, Rds, Ms, Metabase, Matrix, Dimensions system assemblies.
Sub UserProc;
Var
kFact: Integer;
MB: IMetabase;
Inst: IRubricatorInstance;
Res: Integer;
ArrVali: Array[0..1] Of Integer;
MatCop, Mat: IMatrix;
CooSrc, CooRes: IMatrixCoord;
ItSrc, ItRes: IMatrixIterator;
vVal: Variant;
ValiDExecKey: Integer;
ValiRun: IValidationExecRun;
ValiData: IValidationExecData;
Sel: IDimSelectionSet;
Revi: IRubricatorRevision;
Begin
kFact := 324912;
MB := MetabaseClass.Active;
Inst := MB.ItemById("FC_COMM").Open(Null) As IRubricatorInstance;
ValiDExecKey := 19;
ValiData := Inst.GetValidationExecData(ValiDExecKey, DictionaryGetDataOptions.None);
Sel := Null;
// collect validation calculation data
ValiRun := Inst.LoadValidationRun(ValiData, New ValidationExecSelection.CreateSelection(Sel));
Mat := ValiRun.Matrix;
MatCop := ((New MatrixFactory.Create) As IMatrixFactory).CreateMatrix(Mat.Dimensions);
MatCop.OperationMatrix(MatrixOperation.Append, Mat);
Res := 0;
Mat.Clear;
Mat.ValueFlag := 1;
ItSrc := MatCop.CreateIterator;
CooSrc := MatCop.CreateCoord;
ItRes := Mat.CreateIterator;
CooRes := Mat.CreateCoord;
// change collected values
ItSrc.Move(IteratorDirection.First);
While ItSrc.Valid Do
ItSrc.PutCurrentPos(CooSrc);
CooRes.Assign(CooSrc);
CooRes.Item(0) := CooRes.Item(0) + 1;
ItRes.PutCoord(CooRes);
Res := Res + 1;
ItRes.ValueFlag := 0;
vVal := ItSrc.Value;
If Not vVal.IsEmpty Then
ItRes.Value := (vVal As Double) = 0.0 ? 0 : 1;
End If;
ItRes.ValueFlag := 1;
ItSrc.Move(IteratorDirection.Next);
End While;
// save changes
ValiData := Inst.GetValidationExecData(-1, DictionaryGetDataOptions.Create);
ValiData.Name := (Inst As IMetabaseObjectInstance).Object.Name;
ArrVali[0] := 3668;
ArrVali[1] := 3677;
ValiData.Validations := ArrVali;
(ValiData As IRubricatorRecord).Save;
ValiDExecKey := ValiData.Key;
ValiRun.EphemeralFacts := True;
Revi := Inst.OpenRevision("Validation Ephemeral");
ValiRun.Revision := Revi;
Try
Inst.SaveValidationRun(ValiRun, ValiData);
Finally
Dispose ValiRun;
Dispose Revi;
End Try;
End Sub UserProc;
After executing the example validation calculation obtained before is loaded. Values and facts are changed in the matrix of its results. Then the result is saved. Facts are saved with indicator of deletion and indicator of revision.
See also: