Hey Guys,
im really new in programming in navision and i've a short question:
I've an option field Not. Code with 3 possibilities:
OptionString:Customer,Vendor,Production
this field is located in a few other tables.
and now i want to add a ' ' string at the first position:
OptionString: ,Customer,Vendor,Production
I think navision don't use the option string, but instead uses the corresponsible number.
Report Example:
IF Not. Code = Not. Code::Customer THEN......
In my opinion navision looks for Not. Code::0 what means Not. Code::'' after adding the string...
i'm right???
i hope you understand what i mean
thank u very much
Comments
I would advise not to put it as the first option as this will be 0 and all your othe options are moved up by 1 rather set your option to the end
eg. Customer,Vendor,Production,,,,,space
space here means a blank as you will not see it otherwise
the extra commas are to avoid clashing in an upgrade if new options are added in the upgrades.
You could also write a processing report that will add 1 to the option field but remember to do that everywhere that this option string is used.
Albert
or this....
If you write as in the first example, NAV will replace with the textual representation of the options string when you save then reopen the object.
www.NextEqualZero.com
A technical eye on Dynamics NAV
Yes, you are right. If you "insert" new value into the string, nav will shift all meanings of the options in the code (integer representation will stay same, but the value will means something other than...). There is one solution. Export all objects as text, change the option string definition in the text file, import it back, compile. In this case, NAV will use the option Name to find correct integer value and there will be no problem in the code. Of course, already saved values in the table will be wrong...
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.