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;
See Also
FieldRef Data Type
Get Started with AL
Developing Extensions
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈