IValidationDateSettings.DateOptions

Syntax

DateOptions: ValidationDateOptions;

Description

The DateOptions property determines date calculation method.

Comments

This property enables the user to set the following parameters of validation calculation period:

Start date End date
Specified date (default). Specified date (default).
Current date plus/minus k points. Current date plus/minus k points.
Start of data plus/minus k points. End of data plus/minus k points.

Example

Executing the example requires that the repository contains a time series database with the OBJ_FC identifier. This database should contain a validation filter with the OBJ_VALID_FILTER identifier.

Sub UserProc;
Var
    Mb: IMetabase;
    RubrKey: Integer;
    ValidObj: IMetabaseObject;
    ValidFilter: IValidationFilter;
    DateSettings: IValidationDateSettings;
    FilterSett: IValidationFilterSettings;
    Level: IValidationLevel;
    ComparisonValue: IValidationComparisonValue;
    ValidExecSett: IValidationExecuteSettings;
    ValidExecRun: IValidationExecRun;
    MetaAttrValList: IMsMetaAttributeValueList;
Begin
    Mb := MetabaseClass.Active;
    RubrKey := Mb.GetObjectKeyById("OBJ_FC");
    ValidObj := Mb.ItemByIdNamespace("OBJ_VALID_FILTER", RubrKey).Edit;
    ValidFilter := ValidObj As IValidationFilter;
    DateSettings := ValidFilter.StartDateSettings;
    DateSettings.DateOptions := ValidationDateOptions.SpecificDate;
    DateSettings.Date := DateTime.ComposeDay(199011);
    DateSettings := ValidFilter.EndDateSettings;
    DateSettings.DateOptions := ValidationDateOptions.RelativeDate;
    DateSettings.Lag := 0;
    ValidFilter.Level := DimCalendarLevel.Year;
    FilterSett := ValidFilter.Settings;
    FilterSett.Severity := ValidationSeverity.Critical;
    FilterSett.FontColor := New GxColor.CreateRGB(2550255);
    ValidFilter.Kind := ValidationDetailsKind.Level;
    Level := ValidFilter.Details As IValidationLevel;
    ComparisonValue := Level.ComparisonValue;
    ComparisonValue.ComparisonOperator := ValidationComparisonOperator.More;
    ComparisonValue.Percentage := False;
    ComparisonValue.Value1 := 0;
    MetaAttrValList := Level.TargetData;
    MetaAttrValList.Clear;
    ValidObj.Save;
    ValidExecSett := New ValidationExecuteSettings.Create;
    ValidExecRun := ValidFilter.Execute(ValidExecSett);
End Sub UserProc;

After executing the example the dates range for calculation of validation filter is determined from 1990 since present. Then the validation filter is performed for the entire time series database.

See also:

IValidationDateSettings