ValidationExecKey: Integer;
The ValidationExecKey property determines a key of validation execution.
The property is taken into account, if the ValidationValues property is set to True.
Executing the example requires that the repository contains a time series database with the OBJ_RUBRICATOR identifier. This database must contain a unique attribute of the time series with the COUNTRIES identifier that refers to a dictionary.
Sub Main;
Var
MB: IMetabase;
RubDesc: IMetabaseObjectDescriptor;
RubrIn: IRubricatorInstance;
Cub: ICubeInstance;
Dest: ICubeInstanceDestination;
FactorExec: IRubricatorFactorExecutor;
FactorIO: IRubricatorFactorIO;
FactsLookup: IRubricatorFactsLookup;
MetaDLookup: IMetaDictionaryLookup;
Key: Array Of Integer;
i: Integer;
Cond: IOrmCondition;
Exec: ICubeInstanceDestinationExecutor;
Mat: IMatrix;
Ite: IMatrixIterator;
Begin
MB := MetabaseClass.Active;
RubDesc := MB.ItemById("OBJ_RUBRICATOR");
RubrIn := RubDesc.Open(Null) As IRubricatorInstance;
Cub := RubrIn As ICubeInstance;
Dest := Cub.Destinations.DefaultDestination;
Exec := Dest.CreateExecutor;
FactorExec := Exec As IRubricatorFactorExecutor;
FactsLookup := RubrIn.CreateFactsLookup;
MetaDLookup := FactsLookup.Lookup;
Cond := MetaDLookup.Where.Add;
Cond.AttributeName := "COUNTRIES";
Cond.Value := 512;
i := FactsLookup.LookupFactors.Length;
Key := New Integer[i];
Key := FactsLookup.LookupFactors;
FactorExec.SetFactorKeys(Key);
FactorIO := FactorExec As IRubricatorFactorIO;
FactorIO.ValueKind := MetaAttributeKind.Value;
FactorIO.ValueId := "VL";
FactorIO.MultipleFactors := True;
FactorIO.ValidationValues := True;
FactorIO.ValidationExecKey := 1;
Exec := FactorExec.AsCubeExecutor;
Exec.PrepareExecute(Null);
Exec.PerformExecute;
Mat := Exec.Matrix;
Ite := Mat.CreateIterator;
Ite.Move(IteratorDirection.First);
While Ite.Valid Do
Debug.WriteLine(Ite.Value);
Ite.Move(IteratorDirection.Next);
End While;
End Sub Main;
On executing the example the console window displays data of factors for validation execution with the 1 key corresponding to the following condition: value of the COUNTRIES attribute equals to 512.
See also: