SetPropertyByName method: Component Interface class

Syntax

SetPropertyByName(string, value)

Description

The SetPropertyByName method sets the value of the property specified by string. Generally this function is used only in applications that cannot set the names of the component interface properties until runtime.

Parameters

Parameter Description

string

The name of the property.

value

The value to which the property is to be set.

Returns

None.

Example

Local ApiObject &oSession, &oCI;
Local array of string &Keys_Arr, &Temp_Arr, &Prop_Arr;
Local string &strCIName, &PropertyValue;
Local number &I, &J, &K;

&strCIName = "SDK_BUS_EXP";
&Keys_Arr = CreateArrayRept("", 0);
&Keys_Arr.Push("SDK_EMPLID|" | "8001");

&oSession = %Session;
&oCI = &oSession.GetCompIntfc(@("CompIntfc." | &strCIName));

For &I = 1 To &Keys_Arr.Len
   &Temp_Arr = Split(&Keys_Arr [1], "|");
   &oCI.SetPropertyByName(&Temp_Arr [1], &Temp_Arr [2]);
End-For;