DateParamID: String;
The DateParamID property identifies the calendar-point parameter.
The property is used if a term is a calendar parameter, that is, IMsFormulaTermInfo.Type is set to MsFormulaTermType.ParamDate.
If a period or a particular date were set via the DateParamID property, this date will not be taken into account for calculation of Start of Data/End of Data.
Executing the example requires that the repository includes a modeling container with the CONT_M identifier. This container should contain a model with the MODEL identifier.
Add links to the Metabase system assembly. Ms.
Sub UserProc;
Var
mb: IMetabase;
cm: IMetabaseObjectDescriptor;
Model: IMsModel;
Formula: IMsFormula;
Determ: IMsDeterministicTransform;
Transform: IMsFormulaTransform;
Term: IMsFormulaTerm;
TermInfo: IMsFormulaTermInfo;
InputsVar: IMsFormulaTransformVariables;
ParamVar: IMsFormulaTransformVariable;
Slice: IMsFormulaTransformSlice;
Begin
mb := MetabaseClass.Active;
cm := mb.ItemById("CONT_M");
Model := mb.ItemByIdNamespace("Model",cm.Key).Edit As IMsModel;
Transform := Model.Transform;
Formula := Transform.FormulaItem(0);
Determ := Formula.Method As IMsDeterministicTransform;
InputsVar := Transform.Inputs;
ParamVar := InputsVar.AddParamVariable("VAR_PARAM");
Slice := ParamVar.Slices.Add(Null);
Term := Determ.Operands.Add(Slice);
TermInfo := Term.TermInfo;
TermInfo.Type := MsFormulaTermType.ParamDate;
TermInfo.DateParamID:= "VAR_PARAM";
(Model As IMetabaseObject).Save;
End Sub UserProc;
After executing the example, the VAR_PARAM calendar parameter is added for a model.
See also: