IRubricatorFactorIO.ValidationValuesByScenario

Syntax

ValidationValuesByScenario: Boolean;

Description

The ValidationValuesByScenario property determines whether validation data can be saved or extracted in the scenarios dimension.

Comments

Available values:

Example

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 a factor with the COUNTRY identifier that refers to a dictionary. Add links to the Cubes, Matrix, Metabase, Orm, Rds system assemblies.

Sub UserProc;
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(NullAs 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 := "COUNTRY";
    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.ValidationValuesByScenario := 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 UserProc;

On executing the example the console window displays data of validation factors with the 1 key in the scenarios dimension corresponding to the following condition: value of the COUNTRY attribute equals to 512.

See also:

IRubricatorFactorIO