How to get the option value of a Option var?

chandrurec
Member Posts: 560
Hi all,
I am having a option variable named "Sales Type" field in Sales Invoice Header table with option strings such as '',Local Sale, High Sea Sale,SEZ Sale ....
when I put the message of the Sales Type field , I am getting the string name as Local Sales but I should get the value of the corresponding string (i.e1).
For Ex, When I select the "Sales Type" as High Sea Sale then I should get the message as 2 .
Is it possible to achieve this?
If so , Kindly tell me how to get the option value in message.
Thanks in advance.
Regards,
Chandru.
I am having a option variable named "Sales Type" field in Sales Invoice Header table with option strings such as '',Local Sale, High Sea Sale,SEZ Sale ....
when I put the message of the Sales Type field , I am getting the string name as Local Sales but I should get the value of the corresponding string (i.e1).
For Ex, When I select the "Sales Type" as High Sea Sale then I should get the message as 2 .
Is it possible to achieve this?
If so , Kindly tell me how to get the option value in message.
Thanks in advance.
Regards,
Chandru.
0
Comments
-
FORMAT(fieldname,0,2)
This should return the numeric value of the option instead of the option text.2 -
or another trick:
intSomeInteger := "Sales Type".
internally, an option is an integer field, so you can use that.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Hi FlowerBiz/Kriki,
Thanks a lot . I can able to get the option value uisng both of your techniques.
Regards,
Chandru.0 -
chandrurec wrote:Hi FlowerBiz/Kriki,
Thanks a lot . I can able to get the option value uisng both of your techniques.
Regards,
Chandru.
Both work, but Kriki's is the preferred way to do this.David Singleton0
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