Dataport Problem

costasd3
Member Posts: 5
Hi,
I am new to navision and i am trying to make a dataport to import data from an ascii file. One of the fields that i have to fill in is an option field and i use one of the field options in the dataport as the value.
i.e. VarReccord.SETRANGE("Field Name",VarReccord."Field Name"::"Field Option"); and i get back : "The expression text cannot be type-converted to a option value"
Any Ideas on how i can solve this issue?
Thanks
Costas
I am new to navision and i am trying to make a dataport to import data from an ascii file. One of the fields that i have to fill in is an option field and i use one of the field options in the dataport as the value.
i.e. VarReccord.SETRANGE("Field Name",VarReccord."Field Name"::"Field Option"); and i get back : "The expression text cannot be type-converted to a option value"
Any Ideas on how i can solve this issue?
Thanks
Costas
0
Comments
-
Try this using the Integer value of your option field
GreetingsNow, let's see what we can see.
...
Everybody on-line.
...
Looking good!0 -
Can you write the full syntax please?0
-
You can represent an option value by it value:
option::Value
or by it's integer value (starts from 0), the fastest way to find the correct integer value for your option value, is to look at the OptionString that you can find in the Properties of you Option FieldNow, let's see what we can see.
...
Everybody on-line.
...
Looking good!0 -
Thanks0
-
VarReccord.SEFILTER("Field Name",'%1',VarReccord."Field Name"::"Field Option");0
-
This also will work... just put format before the argument..FORMAT(VARIABLE.FIELD::FIELDOPTION)You cannot discover new ocean unless you have the courage to lose sight ofthe shore.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