OptionString not working as supposed

Excuse my poor English.

When we define a field in a table of option as follows:

OptionString [, AA, BB, CC]
OptionCaption [A, B, C, AA, BB, CC]

It is assumed that the options are:
1 A
2 B
3 C
4 AA
5 BB
6 CC

You will be elected but only AA, BB, CC
Options A, B, C are options that are no longer in use

OptionString [,B,AA, BB, CC]
OptionCaption [A, B, C, AA, BB, CC]

This definition works well for sample AA, BB, CC
However

OptionString [,AA, BB, CC]
OptionCaption [A, B, C, AA, BB, CC]

Not working well

Someone may know a solution

You should define it other way round:

Option String is the list of available options, OptionCaption is the list of Visible Options:

OptionString [A,B,C,AA, BB, CC]
OptionCaption [, B, AA, BB, CC]

So the system will only provide selection for the options B, AA, BB and CC

Thanks for responding.

I see that if
OptionString: [A, B, C, AA, BB, CC]
OptionCaption: [, AA, BB, CC]

The system lets you enter only the values: AA, BB, CC.
But does not draw values: a, b, c.
The system draws the corresponding numbers: 1,2,3, and no description.

In contrast, if
OptionString: [A, B, C, AA, BB, CC]
OptionCaption: [,B, AA, BB, CC]

The system works perfectly.
Hides the options A and C and draw options B, AA, BB, CC

However, if
OptionString: [A, B, C, AA, BB, CC]
OptionCaption: [, C, AA, BB, CC]

The system does not hide the options A and B
What happens when there are 3 commas OptionCaption?

What you need to understand is:

OptionString represents the values stored in the database and visible to the programmer.

The numeric interpretation is assigned on a zero-based index:

OptionString A,B,C,D,E,F is stored in Navision as follows:

0 = A, 1 = B, 2 = C, 3 = D, etc.

When you set the option string to ,DEF then Navision still stores:

0 = , 1 = , 2 = , 3 = D, etc.

This has in the first step nothing to do with the representation as presented to the user. For this you define the “OptionCaption”. There you can write any information into the comma seperated string like:

Navision,Was,My,First,Love

When you omitt one value like “Navision,Was,My,Love” then Navision just presents the options 0,1,2 and 4 to the user. Nevertheless when Navision finds a value not covered by the OptionString like in your first example, Navision will present the numeric representation to the user (like 2).

Excuse my insistence.

Suppose a hypothetical case:
We have an option field where Navision is stored in three cities:

Paris, Rome, Madrid
OptionString: [, Paris, Rome, Madrid]
OptionCaption: [, Paris, Rome, Madrid]

We need that from now on users can choose only the options Madrid, Vienna, London, but the options they are not replaced by Paris and Rome, 1 and 2 since users will not know its meaning.

Is this possible?
How to define OptionString and then OptionCaption?

Option String: ,Paris, Rome, Madrid, Vienna, London

Option Caption: ,Madrid,Vienna,London

Just remove the options from the caption (not from the option string). Do not place blanks between the commas !