No. Series Renewing

Belias
Member Posts: 2,998
hi everyone: sometimes new year means new no. series to create. to make this thing faster for me or for customer that does this alone, i've created this form (it's rude, i know, but i've done it in 2 hour this morning, after a week of holidays).
ending no., warning no., last no. used, last date used fields are cleared. The data is commited when you close the form, because the user is working on a temporary table
Please give me feedback about this, enjoy!
OBJECT Form 55667 NoSeriesRenew { OBJECT-PROPERTIES { Date=04/01/10; Time=16.30.48; Modified=Yes; Version List=Utility; } PROPERTIES { Width=17710; Height=16060; MaximizedOnOpen=Yes; SourceTable=Table309; SourceTableTemporary=Yes; OnOpenForm=BEGIN TBNoserLine.SETCURRENTKEY("Series Code","Starting Date","Starting No."); TBNoserLine.FINDSET; REPEAT TBNoserLineCheck.SETRANGE("Series Code",TBNoserLine."Series Code"); TBNoserLineCheck.FINDLAST; Rec := TBNoserLineCheck; IF Rec.INSERT THEN; UNTIL TBNoserLine.NEXT = 0; TBNoserLineTemp.DELETEALL; Rec.FINDSET; REPEAT TBNoserLineTemp := Rec; TBNoserLineTemp.INSERT; UNTIL Rec.NEXT = 0; END; OnCloseForm=BEGIN Rec.RESET; TBNoserLineTemp.RESET; IF Rec.FINDSET THEN BEGIN REPEAT IF NOT TBNoserLineTemp.GET("Series Code","Line No.") THEN BEGIN TBNoserLine := Rec; TBNoserLine.INSERT; END; UNTIL Rec.NEXT = 0; END; END; } CONTROLS { { 1130000;TableBox ;110 ;110 ;17600;15950;HorzGlue=Both; VertGlue=Both } { 1130001;TextBox ;159 ;3520 ;1700 ;440 ;ParentControl=1130000; InColumn=Yes; SourceExpr="Series Code"; OnValidate=BEGIN Rec.SETRANGE("Series Code","Series Code"); Rec.FINDLAST; Rec.SETRANGE("Series Code"); Rec."Starting Date" := CALCDATE('<1Y>',Rec."Starting Date"); Rec."Line No." := Rec."Line No." + 10000; Rec."Warning No." := ''; Rec."Ending No." := ''; Rec."Last Date Used" := 0D; Rec."Last No. Used" := ''; END; } { 1130002;Label ;0 ;0 ;0 ;0 ;ParentControl=1130001; InColumnHeading=Yes } { 1130003;TextBox ;1859 ;3520 ;1700 ;440 ;Editable=No; ParentControl=1130000; InColumn=Yes; SourceExpr="Line No." } { 1130004;Label ;0 ;0 ;0 ;0 ;ParentControl=1130003; InColumnHeading=Yes } { 1130005;TextBox ;3559 ;3520 ;1700 ;440 ;ParentControl=1130000; InColumn=Yes; SourceExpr="Starting Date" } { 1130006;Label ;0 ;0 ;0 ;0 ;ParentControl=1130005; InColumnHeading=Yes } { 1130007;TextBox ;5259 ;3520 ;1693 ;440 ;ParentControl=1130000; InColumn=Yes; SourceExpr="Starting No." } { 1130008;Label ;0 ;0 ;0 ;0 ;ParentControl=1130007; InColumnHeading=Yes } { 1130009;TextBox ;6959 ;3520 ;1700 ;440 ;ParentControl=1130000; InColumn=Yes; SourceExpr="Ending No." } { 1130010;Label ;0 ;0 ;0 ;0 ;ParentControl=1130009; InColumnHeading=Yes } { 1130011;TextBox ;8659 ;3520 ;1700 ;440 ;ParentControl=1130000; InColumn=Yes; SourceExpr="Warning No." } { 1130012;Label ;0 ;0 ;0 ;0 ;ParentControl=1130011; InColumnHeading=Yes } { 1130013;TextBox ;10359;3520 ;1700 ;440 ;ParentControl=1130000; InColumn=Yes; SourceExpr="Increment-by No." } { 1130014;Label ;0 ;0 ;0 ;0 ;ParentControl=1130013; InColumnHeading=Yes } { 1130015;TextBox ;12059;3520 ;1700 ;440 ;ParentControl=1130000; InColumn=Yes; SourceExpr="Last No. Used" } { 1130016;Label ;0 ;0 ;0 ;0 ;ParentControl=1130015; InColumnHeading=Yes } { 1130017;CheckBox ;13759;3520 ;1700 ;440 ;ParentControl=1130000; InColumn=Yes; ShowCaption=No; SourceExpr=Open } { 1130018;Label ;0 ;0 ;0 ;0 ;ParentControl=1130017; InColumnHeading=Yes } { 1130019;TextBox ;15459;3520 ;1700 ;440 ;ParentControl=1130000; InColumn=Yes; SourceExpr="Last Date Used" } { 1130020;Label ;0 ;0 ;0 ;0 ;ParentControl=1130019; InColumnHeading=Yes } } CODE { VAR TBNoserLine@1130001 : Record 309; TBNoserLineCheck@1130002 : Record 309; TBNoserLineTemp@1130003 : TEMPORARY Record 309; BEGIN END. } }The form will show the last no. series line for each series code, and it allows you to insert new lines: just insert a new line in the form with f3 and copy the value of the series code with F8: the line no. is automatically incremented by 10000 and the starting date is automatically incremented by 1 year. You just have to adjust the starting no. on the line.
ending no., warning no., last no. used, last date used fields are cleared. The data is commited when you close the form, because the user is working on a temporary table
Please give me feedback about this, enjoy!
0
Comments
-
When someone has nothing to do... it's a great thing to do some utilz! =D> =D>
Happy new year!
When you want to make some more difficult things just tell me... :roll:0 -
youcantouchthis wrote:When you want to make some more difficult things just tell me... :roll:0
-
Belias wrote:youcantouchthis wrote:When you want to make some more difficult things just tell me... :roll:
You can get this? well..
I want to show a DB Explosion with multiple levels.
When you click on an item, it should explode the level below. So you can have all the DB tree in one shot.
Is it possible?0 -
i don't know, but it's better for you to open a new topic in the right section of the forum and explain your problem better...here it is off topic and maybe noone will answer.
I hope to read your topic soon0 -
You told me you can get this..... and now you ask me to move the topic?
](*,)
Maybe it's better for you to back on your... No. Series Renewing tests!
bye bye!0 -
youcantouchthis wrote:You told me you can get this...
P.S.: you should be more kind with people that try to help you; don't provoke me further, i won't answer
P.P.S.: did you read the title of the section? "Tips&Tricks": this means that it is the place to post already solved problems that can be helpful for others. If you don't like my code, don't use it (did you even try to import the form?)0 -
Belias wrote:aha, i think you have misread this phrasei can't get this...what do you mean?
Ahah I misunderstood the "t"! I thought u were in god mode!
Hi belias. strange nick0
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