Line No. doesn't work

mark_christsmark_christs Member Posts: 156
Dear All,
I have added a field in a table, and it's line no. that will show position of item for exmple Line No. 10000, 20000, 30000, etc. according to item put in the line. The field is shown in the form but created in a table. the table is a sourcetable for the form.
I've set autosplitkey in the form, or add the field in the primary keys of the table as the last but still not work good.
Any answers from you are expected and welcome. tks a lot.


Rgds,
Mark Christs

Comments

  • krikikriki Member, Moderator Posts: 9,118
    In the form, you need to filter ONLY on the fields of the primary key that come BEFORE the "Line No.". If you have other filters, the autosplit-functionality gets confused.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • mark_christsmark_christs Member Posts: 156
    Hi,
    I can't still find it work good, is it another solution besides that..?


    Rgds,
    Mark
  • krikikriki Member, Moderator Posts: 9,118
    I can't still find it work good, is it another solution besides that..?
    Can you give some more information. What does it do (or not do)?
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • mark_christsmark_christs Member Posts: 156
    Dear kriki,
    I have a table (let say table x) and it exists in navision. There is a field there let say field x. its datatype is integer. It is primary key in the table. I create then line no. field and has datatype integer too. I want it to be indicator of line, for example in the table there are item A, line no. 10000, item B line no. 20000 etc. the field x also show that but its no. begin from 1, 2, 3 etc..
    So, I want to create coding that functions to split a data in a certain field (let say field y) in the table to a selected lines for example I select line 10000 - 30000, then a data in the field y will be splitted and filled to the other line but the same field.

    Tks a lot for your answer then

    Rgds,
    Mark
  • krikikriki Member, Moderator Posts: 9,118
    I created a table+form where it works. Save the code in a textfile and import it into a cronus 4.0 or higher DB (probably it works also in a lower version). It uses table 50000 and form 50000.
    To have it work correctly, you should put a filter on field x to show only 1 value.
    OBJECT Table 50000 Split Line
    {
      OBJECT-PROPERTIES
      {
        Date=22/06/06;
        Time=15:25:42;
        Modified=Yes;
        Version List=;
      }
      PROPERTIES
      {
      }
      FIELDS
      {
        { 1   ;   ;x                   ;Integer        }
        { 2   ;   ;y                   ;Integer        }
        { 10  ;   ;Some Data           ;Text30         }
      }
      KEYS
      {
        {    ;x,y                                     ;Clustered=Yes }
      }
      CODE
      {
    
        BEGIN
        END.
      }
    }
    
    OBJECT Form 50000 Split Lines
    {
      OBJECT-PROPERTIES
      {
        Date=22/06/06;
        Time=15:26:08;
        Modified=Yes;
        Version List=;
      }
      PROPERTIES
      {
        Width=9790;
        Height=6710;
        TableBoxID=1000000000;
        SourceTable=Table50000;
        AutoSplitKey=Yes;
      }
      CONTROLS
      {
        { 1000000000;TableBox;220 ;220  ;9350 ;5500 ;HorzGlue=Both;
                                                     VertGlue=Both }
        { 1000000001;TextBox;0    ;0    ;1700 ;0    ;ParentControl=1000000000;
                                                     InColumn=Yes;
                                                     SourceExpr=x }
        { 1000000002;Label  ;0    ;0    ;0    ;0    ;ParentControl=1000000001;
                                                     InColumnHeading=Yes }
        { 1000000003;TextBox;0    ;0    ;1700 ;0    ;ParentControl=1000000000;
                                                     InColumn=Yes;
                                                     SourceExpr=y }
        { 1000000004;Label  ;0    ;0    ;0    ;0    ;ParentControl=1000000003;
                                                     InColumnHeading=Yes }
        { 1000000005;TextBox;0    ;0    ;4400 ;0    ;HorzGlue=Both;
                                                     ParentControl=1000000000;
                                                     InColumn=Yes;
                                                     SourceExpr="Some Data" }
        { 1000000006;Label  ;0    ;0    ;0    ;0    ;ParentControl=1000000005;
                                                     InColumnHeading=Yes }
        { 1000000007;CommandButton;2530;5940;2200;550;
                                                     HorzGlue=Right;
                                                     VertGlue=Bottom;
                                                     Default=Yes;
                                                     PushAction=LookupOK;
                                                     InvalidActionAppearance=Hide }
        { 1000000008;CommandButton;4950;5940;2200;550;
                                                     HorzGlue=Right;
                                                     VertGlue=Bottom;
                                                     Cancel=Yes;
                                                     PushAction=LookupCancel;
                                                     InvalidActionAppearance=Hide }
        { 1000000009;CommandButton;7370;5940;2200;550;
                                                     HorzGlue=Right;
                                                     VertGlue=Bottom;
                                                     PushAction=FormHelp }
      }
      CODE
      {
    
        BEGIN
        END.
      }
    }
    
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • mark_christsmark_christs Member Posts: 156
    Dear Kriki,
    Tks a lot for the codings. I will try to use them. Anyway, I will inform if any problems arise.


    Rgds,
    Mark
Sign In or Register to comment.