Table Key - Auto Increment

depro
Member Posts: 46
Hello,
I am trying to make table with key: "Document No." (Code 20), "Type" (Option), and "Line No." (Integer).
Other fields are: Address, Comment etc.
I set Auto Increment Proporty on "Line No." field to Yes.
Then when I insert record to his table I get resoult like that:
Document no. = A, Type = L, Line No. = 1
Document no. = A, Type = L, Line No. = 2
Document no. = A, Type = L, Line No. = 3
But what i need is to start "Line no." with 1 on every new combinacion of "Document No" and "Type".
Is there any property to set "Line no." to start with 1 on every combination?
Or do i make some hardcoding implementation?
regards,
Depro
I am trying to make table with key: "Document No." (Code 20), "Type" (Option), and "Line No." (Integer).
Other fields are: Address, Comment etc.
I set Auto Increment Proporty on "Line No." field to Yes.
Then when I insert record to his table I get resoult like that:
Document no. = A, Type = L, Line No. = 1
Document no. = A, Type = L, Line No. = 2
Document no. = A, Type = L, Line No. = 3
But what i need is to start "Line no." with 1 on every new combinacion of "Document No" and "Type".
Is there any property to set "Line no." to start with 1 on every combination?
Or do i make some hardcoding implementation?
regards,
Depro
0
Answers
-
Look at how the Sales Order Form / Subform works. The line number though is 10000 - 20000 ...
If this does not suite you, I think you'll need to write code for this.0 -
IF this key is Primary then BEGIN
just use AutoSplitKey=TRUE on form, - but then system will number line No. - 10000, 20000, 30000 for every new
combination of Doc Type,Option.
END; 8)0 -
Thanks guys,
AutoSplitHey property is what i need.
regards,
Depro0 -
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