IMsCustomTerm.IsPeriod

Syntax

IsPeriod(StartDate: String;

        [EndDate: String = "SameDate";]

        [CustomFrequency: MsFrequancy = 0]): Variant;

Parameters

StartDate. Period start date.

EndDate. Period end date.

CustomFrequency. The frequency, for which values are created.

Description

The IsPeriod method returns the dummy variable that determines whether the observation hits the specified period.

Comments

The following dummies may be implemented within this method:

Features of setting parameters:

Example

Executing the example requires that the repository contains a modeling container with the CONT_MODEL identifier that contains a determinate equation model with the DUMMIS_DETERM identifier.

Add links to the Metabase and Ms system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    MsDescr: IMetabaseObjectDescriptor;
    Model: IMsModel;
    Transf: IMsFormulaTransform;
    Determ: IMsDeterministicTransform;
Begin
    mb := MetabaseClass.Active;
    MsDescr := mb.ItemById("CONT_MODEL");
    Model := mb.ItemByIdNamespace("DUMMIES_DETERM", MsDescr.Key).Edit As IMsModel;
    Transf := Model.Transform;
    Determ := Transf.FormulaItem(0).Method As IMsDeterministicTransform;
    Determ.Expression.AsString := "IsPeriod(""" + "2000A" + """,NoDate)";
    (Model As IMetabaseObject).Save;
End Sub UserProc;

After executing the example the IsPeriod and NoDate dummy variables are used in the model equation. The dummy selects values starting with 2000 year and till the end of the sample period.

See also:

IMsCustomTerm