FieldRef.OptionString() Method
Version: Available or changed with runtime version 1.0 until version 1.0 where it was deprecated.
The 'OptionString' property has been deprecated and will be removed in the future. Use the 'OptionMembers' property instead.
Syntax
OptionMembers := FieldRef.OptionString()
Note
This method can be invoked using property access syntax.
Parameters
FieldRef
Type: FieldRef
An instance of the FieldRef data type.
Return Value
OptionMembers
Type: Text
Remarks
All the options for this field are returned as a comma separated-string.
This method returns an error if no field is selected.
If the field is not an option an empty string is returned.
Example
The following example opens the Item table with RecordRef variable that is named ItemRecref and creates a reference to field 19 (Price/Profit Calculation), which is an Options field. The OptionString method retrieves the options in the field and displays them as a comma-separated list.
var
MyFieldRef: FieldRef;
ItemRecref: RecordRef;
OptionString: Text;
begin
ItemRecref.Open(Database::Item);
MyFieldRef := ItemRecref.Field(19);
OptionString := MyFieldRef.OptionString;
Message(' %1', OptionString);
end;
Related information
FieldRef Data Type
Get Started with AL
Developing Extensions