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 indicator with the COUNTRIES identifier that refers to a dictionary.
Sub UserProc;
Var
MB: IMetabase;
RubrInst: IRubricatorInstance;
Cube: ICubeInstance;
Dest: ICubeInstanceDestination;
FactorExec: IRubricatorFactorExecutor;
FactorIO: IRubricatorFactorIO;
FactsLookup: IRubricatorFactsLookup;
MetaDLookup: IMetaDictionaryLookup;
Key: Array Of Integer;
i: Integer;
Cond: IOrmCondition;
Exec: ICubeInstanceDestinationExecutor;
Matr: IMatrix;
It: IMatrixIterator;
Begin
MB := MetabaseClass.Active;
RubrInst := MB.ItemById("OBJ_RUBRICATOR").Open(Null) As IRubricatorInstance;
Cube := RubrInst As ICubeInstance;
Dest := Cube.Destinations.DefaultDestination;
Exec := Dest.CreateExecutor;
FactorExec := Exec As IRubricatorFactorExecutor;
FactsLookup := RubrInst.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;
Matr := Exec.Matrix;
It := Matr.CreateIterator;
It.Move(IteratorDirection.First);
While It.Valid Do
Debug.WriteLine(It.Value);
It.Move(IteratorDirection.Next);
End While;
End Sub UserProc;
After executing the example the console window displays data of indicators for validation execution with the 1 key corresponding to the following condition: value of the COUNTRIES attribute equals to 512.
See also: