IValidationComparisonValue.Value2

Syntax

Value2: Double;

Description

The Value2 property determines the second compared value. The given property is taken into account if the IValidationComparisonValue.ComparisonOperator property value is ValidationComparisonOperator.Between or ValidationComparisonOperator.Notbetween.

Example

Executing the example requires a form, a button  named Button1 on it, the  TabSheetBox component and the UiErAnalyzer  component named UiErAnalyzer1 that is used as a data source for TabSheetBox. Workspace of the OBJ_FC time series database must be loaded to UiErAnalyzer1. This database should contain a validation filter with the OBJ_VALID_FILTER identifier.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);

Var

Mb: IMetabase;

RubrKey: Integer;

ValidObj: IMetabaseObject;

ValidFilter: IValidationFilter;

FilterSett: IValidationFilterSettings;

Level: IValidationLevel;

ComparisonValue: IValidationComparisonValue;

ValidExecSett: IValidationExecuteSettings;

ValidExecRun: IValidationExecRun;

Analyzer: IEaxAnalyzer;

DiagRep: IDiagnosticReport;

Begin

Mb := MetabaseClass.Active;

RubrKey := Mb.GetObjectKeyById("OBJ_FC");

ValidObj := Mb.ItemByIdNamespace("OBJ_VALID_FILTER", RubrKey).Edit;

ValidFilter := ValidObj As IValidationFilter;

ValidFilter.Level := DimCalendarLevel.Year;

FilterSett := ValidFilter.Settings;

FilterSett.Severity := ValidationSeverity.Critical;

FilterSett.FontColor := GxColor.FromName("Red");

ValidFilter.Kind := ValidationDetailsKind.Level;

Level := ValidFilter.Details As IValidationLevel;

ComparisonValue := Level.ComparisonValue;

ComparisonValue.ComparisonOperator := ValidationComparisonOperator.Between;

ComparisonValue.Percentage := False;

ComparisonValue.Value1 := 50;

ComparisonValue.Value2 := 100;

ValidObj.Save;

ValidExecSett := New ValidationExecuteSettings.Create;

Analyzer := UiErAnalyzer1.ErAnalyzer;

ValidExecSett.Laner := Analyzer.Laner;

ValidExecRun := ValidFilter.Execute(ValidExecSett);

DiagRep := New DiagnosticReport.Create;

DiagRep.Run := ValidExecRun;

DiagRep.EaxAnalyzer := Analyzer;

End Sub Button1OnClick;

After executing the example the Compare with Number validation filter is set up: the series values within the range of 50 to 100 are indicated by red font. This filter is applied to the loaded workspace, for example:

See also:

IValidationComparisonValue