New Option String

Malhody
Member Posts: 14
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
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
0
Comments
-
Hi
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.
Albert0 -
When coding, you can either write you code like this:
IF Test = Test::"0" THEN; IF Not. Code = Not. Code ::"1" THEN; IF Not. Code = Not. Code ::"2" THEN; IF Not. Code = Not. Code ::"3" THEN;
or this....IF Not. Code = Not. Code ::" " THEN; IF Not. Code = Not. Code ::Customer THEN; IF Not. Code = Not. Code ::Vendor THEN; IF Not. Code = Not. Code ::Production THEN;
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.0 -
Malhody wrote: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
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...0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions