다음을 통해 공유


OptionString Property

Sets the option values for a field, text box, or variable. OptionString is multilanguage enabled.

Subhead

  • Fields

  • Variables

Remarks

If the OptionCaptionML Property is set, then users see the OptionCaptionML values as the option values. However, the value that is used in C/AL code or that is stored in the database will be the corresponding value from the OptionString property.

This allows you to present strings to users in different languages. The strings that are displayed to users are selected according to the user's current language setting. For more information, see Multilanguage Development. If the OptionCaptionML Property is not set, then users will see the values from OptionString.

For other multilanguage enabled properties (Caption Property, ToolTip Property, PageNames Property and ReqFilterHeading Property), there is a relationship between the property itself and the multilanguage counterpart. The only connection between the OptionString and OptionCaptionML properties is that if the OptionCaptionML property is not set, then the strings displayed are taken from the OptionString property.

For Option fields and variables, use this property to list the options you want to be accepted (and displayed, if OptionCaptionML is not set). You can enter a maximum of 250 characters. Separate the options with a comma. For example: option1,option2,option3.

For controls, you can use this property to limit the number of options that the user can select. You cannot add options; if you do, a run-time error occurs when users select an option outside the set of options defined for the field or variable.

This property setting is checked recursively during validation.

See Also

Reference

OptionCaptionML Property