IMetabaseObjectParamBinding.AsString

Syntax

AsString: String;

Description

The AsString property determines parameters of the editor, which will be used to edit parameter values.

Comments

Editor parameters are set using the binding string. To get the binding string, use the IBindingValue.AsString property.

Example

Executing the example requires that the repository contains an object with the OBJTEST identifier.

Sub CreateObjectParam;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    Param: IMetabaseObjectParam;
    BM: IBindingManager;
    IntegerEditBinding: IBindingIntegerEdit;
Begin
    Mb := MetabaseClass.Active;
    MObj := Mb.ItemById("OBJTEST").Edit;
    Param := MObj.Params.Add;
    Param.DataType := DbDataType.String;
    //Set up value editor
    BM := New BindingManager.Create;
    IntegerEditBinding := BM.CreateByUi("IntegerEdit"As IBindingIntegerEdit;
    IntegerEditBinding.MinValue := -100;
    IntegerEditBinding.MaxValue := +100;
    IntegerEditBinding.Value := 0;
    Param.Binding.AsString := IntegerEditBinding.AsString;
    MObj.Save;
End Sub CreateObjectParam;

A new parameter is created for the object after executing this example. Value editor is set up for the parameter: integer value editor is sued for setting the value, available values range is [-100; 100], default value is 0.

See also:

IMetabaseObjectParamBinding