Option Field
Hanen
Member Posts: 281
Hi,
I have an option field and I want to get something like this:
if (option = option::red) then index:=1
if (option = option::black) then index:=2
if (option = option::yellow) then index:=3
......
without having to do this with an if ...then
thanks for help!!!
I have an option field and I want to get something like this:
if (option = option::red) then index:=1
if (option = option::black) then index:=2
if (option = option::yellow) then index:=3
......
without having to do this with an if ...then
thanks for help!!!
Regards
Hanen TALBI
Hanen TALBI
0
Comments
-
Read w1w1adg.pdf document from Navision install CD.0
-
I don't have this document :oops:
Regards
Hanen TALBI0 -
google it
0 -
[-X no, you have to Bing it
Fostering a homeless, abused child is the hardest yet most rewarding thing I have ever done.0 -
I got it
but I can't find how, any help???? Regards
Hanen TALBI0 -
Just in CASE you didn't understand, seek and you shall find
0 -
look for "case statement"
there's a NAV CAL Programming Guide.pdf
here: http://www.microsoft.com/downloads/deta ... layLang=en
See page 14 for case examplesCASE MyOption OF MyOption::Red: Index := 1; MyOption::Black: Index := 2; MyOption::Yellow: Index := 3; END;0 -
If you want the index right in the order of the options, you can use this:
index:= option +1; //Option is zer-based
But of course do not forget about drawbacks like that if someone change the order etc...0 -
Thank you soooooo much :thumbsup: =D>Regards
Hanen TALBI0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 328 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
