Year field in Table
snehalppatel
Member Posts: 34
Hello All,
For one of the requirement, I need to add a Year field in the table. What is the easiest way to accomplish the task. I will also show this field on the form, from where user will enter the Year. What datatype is preferable, and how to format it?
Thanks in Advance.
For one of the requirement, I need to add a Year field in the table. What is the easiest way to accomplish the task. I will also show this field on the form, from where user will enter the Year. What datatype is preferable, and how to format it?
Thanks in Advance.
Snehal Kumar Patel
MCTS - Microsoft Dynamics NAV
MCTS - Microsoft Dynamics NAV
0
Answers
-
use year data type as integer. what is the issue to creating the year field in a table???
Regards,
kishore...0 -
The issue is, i want to allow users to only enter four digits for year, not less than four digits.kish2007 wrote:use year data type as integer. what is the issue to creating the year field in a table???
Regards,
kishore...Snehal Kumar Patel
MCTS - Microsoft Dynamics NAV0 -
how about on validate of the year field
Length := STRLEN(YEAR)
if Length <> 4 then ERROR('Invalid Year');0 -
FIrstly there is not enough information here to say if you should use a DATE, CODE or INTEGER field. But assuming you go for Integer, just set the property MINVALUE=1900 and MAXVALUE=2100 or something like that.David Singleton0
-
why not option field?? with option string=1900,1901... .. .. .. ...2049,2050-Mihail- [MCTS]0
-
mihail_kolev wrote:why not option field?? with option string=1900,1901... .. .. .. ...2049,2050
Because it would be pretty much unusable.David Singleton0 -
[Topic moved from 'NAV 2009' forum to 'NAV/Navision' forum]Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
David Singleton wrote:FIrstly there is not enough information here to say if you should use a DATE, CODE or INTEGER field. But assuming you go for Integer, just set the property MINVALUE=1900 and MAXVALUE=2100 or something like that.
i needed to create a report request form once where the user just wanted to key in a year and this is precisely what i did. i set it to integer and entered MIN MAX values. I do recall that i then had to do some other code to make the "year" usable when setting the data filters, but it wasn't very complicated.
it worked fine.kind of fell into this...0
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
- 327 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

