Ascending order

subrata.baurisubrata.bauri Member Posts: 21
Respected HalMdy Sir,


sir, I want see ascending order from a user who gives 3 integer value as a input.

sir, do it by following logic

If a>b AND b>c THEN ......
a,b,c like this.

But sir, I donot want this type vast coding.
sir can u give the solution.
Thanks a lot

Comments

  • HalMdyHalMdy Member Posts: 429
    The input value is stored in a field of the table ?

    If yes, simply create a new key on this field in the table.
    Then, in the form, you can choose the new key to sort on ...
  • krikikriki Member, Moderator Posts: 9,118
    Put the 3 integers in a temptable of table 17:"G/L Entry" (or another entry table) and then read them in order.
    E.g. of the code:
    CLEAR(tmpGLEntry);
    tmpGLEntry."Entry No." := Integer1;
    tmpGLEntry.INSERT(FALSE);
    tmpGLEntry."Entry No." := Integer2;
    tmpGLEntry.INSERT(FALSE);
    tmpGLEntry."Entry No." := Integer3;
    tmpGLEntry.INSERT(FALSE);
    ... and other integers if needed.
    tmpGLEntry.RESET;
    IF tmpGLEntry.FIND('-') THEN
      REPEAT
        MESSAGE('Integer = %1',tmpGLEntry."Entry No.");
      UNTIL tmpGLEntry.NEXT = 0;
    
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.