ParamId: String;
ParamId: string;
The ParamId property determines identifier of the parameter that sets value of the attribute.
If the parameter identifier is not set, value of the parameter is determined with the ILanerMetaAttributeValue.Value property.
If the ParamId and ILanerMetaAttributeValue.Value properties are not set, value of the attribute is determined with the property which is set last.
Executing the example requires a form containing the LanerBox component with the LanerBox1 identifier and the UiErAnalayzer component with the UiErAnalayzer1 identifier that is a data source for LanerBox1. UiErAnalyzer1 must have loaded the workbook of the time series database that contains some series and an integer parameter with the COUNTRY_PARAM identifier. The time series database must include the custom time series attribute with the COUNTRY identifier.
Add a link to the Transform system assembly.
Sub MetaAttrVal;
Var
Eax: IEaxAnalyzer;
ParamProv: ITsParamProvider;
ParamVal: ITsModelParamValue;
Series: ILanerSerie;
AttrValList: ILanerMetaAttributeValueList;
AttrVal: ILanerMetaAttributeValue;
Laner: ILaner;
Begin
Eax := UiErAnalyzer1.ErAnalyzer;
// Get an object used to work with parameters
ParamProv := Eax.ParamProvider As ITsParamProvider;
// Set value of the COUNTRY_PARAM parameter
ParamVal := ParamProv.ParamValues.FindById("COUNTRY_PARAM");
ParamVal.Value := 914;
// Get a selected series
Series := LanerBox1.SelectedSeries(0);
// Get collection of series attributes' values
AttrValList := Series.MetaAttributeValueList;
// Indicate that value of the COUNTRYattribute is determined with the COUNTRY_PARAM parameter
AttrVal := AttrValList.FindById("COUNTRY");
AttrVal.ParamId := "COUNTRY_PARAM";
// Update data
Laner := Eax.Laner;
Laner.Refresh;
End Sub MetaAttrVal;
After executing the example value of the COUNTRY attribute is determined with the COUNTRY_PARAM parameter for the series highlighted in the LanerBox1 component.
The requirements and result of the Fore.NET example execution match with those in the Fore example. Use Fore.NET analogs instead of Fore components.
Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Laner;
Imports Prognoz.Platform.Interop.Transform;
…
Public Sub MetaAttrVal();
Var
Eax: IEaxAnalyzer;
ParamProv: ITsParamProvider;
ParamVal: ITsModelParamValue;
Series: ILanerSerie;
AttrValList: ILanerMetaAttributeValueList;
AttrVal: ILanerMetaAttributeValue;
Laner: ILaner;
Begin
Eax := uiErAnalyzerNet1.ErAnalyzer.ErAnalyzer;
// Get an object used to work with parameters
ParamProv := Eax.ParamProvider As ITsParamProvider;
// Set value of the COUNTRY_PARAM parameter
ParamVal := ParamProv.ParamValues.FindById("COUNTRY_PARAM");
ParamVal.Value := 914;
// Get a selected series
Series := lanerBoxNet1.SelectedSeries[0];
// Get collection of series attributes' values
AttrValList := Series.MetaAttributeValueList;
// Indicate that value of the COUNTRY attribute is determined with the COUNTRY_PARAM parameter
AttrVal := AttrValList.FindById("COUNTRY");
AttrVal.ParamId := "COUNTRY_PARAM";
// Update data
Laner := Eax.Laner;
Laner.Refresh();
End Sub;
See also: