ItemDefined(Index: Integer): Boolean;
ItemDefined[Index: Integer]: Boolean;
Index. Parameter number.
The ItemDefined property determines whether parameter with the specified number is present in binding string.
If the ItemDefined property is set to True, the binding string describing the value editor contains the parameter with the specified identifier. The value of this parameter is determined by the Item property.
Sub DimComboParamInfo(SourceBinding: String);
Var
BM: IBindingManager;
Binding: IBindingValue;
DimComboBinding: IBindingDimCombo;
Params: IBindingObjectParamValues;
i: Integer;
Begin
BM := New BindingManager.Create;
Binding := BM.CreateByValue(SourceBinding);
If Binding.UI = "DimCombo" Then
DimComboBinding := Binding As IBindingDimCombo;
Params := DimComboBinding.ParamValues;
If Params.Count > 0 Then
//Check if there is the YEAR_START parameter that is created in calendar dictionary
If Params.ValueDefined("PARAMID_YEAR_START") Then
Debug.WriteLine("YEAR_START: " + Params.Value("PARAMID_YEAR_START"));
End If;
//Check if there is the YEAR_FINISH parameter that is created in calendar dictionary
If Params.ValueDefined("PARAMID_YEAR_FINISH") Then
Debug.WriteLine("YEAR_FINISH: " + Params.Value("PARAMID_YEAR_FINISH"));
End If;
//Check parameters by numbers
For i := 1 To Params.Count Do
If Params.ItemDefined(i) Then
Debug.WriteLine("Parameter No" + i.ToString + ". Value: " + Params.Item(i));
End If;
End For;
End If;
End If;
End Sub DimComboParamInfo;
This function checks the binding string passed as the SourceBinding input parameter. If a binding string corresponds to the editor as a dictionary drop-down list and has in text values of parameters passed to open the dictionary, these values are displayed in the development console.
The requirements and result of the Fore.NET example execution match with those in the Fore example.
Imports Prognoz.Platform.Interop.ForeSystem;
Sub DimComboParamInfo(SourceBinding: String);
Var
BM: BindingManager = New BindingManagerClass();
Binding: IBindingValue;
DimComboBinding: IBindingDimCombo;
Params: IBindingObjectParamValues;
i: Integer;
Begin
Binding := BM.CreateByValue(SourceBinding);
If Binding.UI = "DimCombo" Then
DimComboBinding := Binding As IBindingDimCombo;
Params := DimComboBinding.ParamValues;
If Params.Count > 0 Then
//Check if there is the YEAR_START parameter that is created in calendar dictionary
If Params.ValueDefined["PARAMID_YEAR_START"] Then
System.Diagnostics.Debug.WriteLine("YEAR_START: " + Params.Value["PARAMID_YEAR_START"]);
End If;
//Check if there is the YEAR_FINISH parameter that is created in calendar dictionary
If Params.ValueDefined["PARAMID_YEAR_FINISH"] Then
System.Diagnostics.Debug.WriteLine("YEAR_FINISH: " + Params.Value["PARAMID_YEAR_FINISH"]);
End If;
//Check parameters by numbers
For i := 1 To Params.Count Do
If Params.ItemDefined[i] Then
System.Diagnostics.Debug.WriteLine("Parameter No" + i.ToString() + ". Value: " + Params.Item[i]);
End If;
End For;
End If;
End If;
End Sub;
See also: