how to do sorting on the form ?

cyuwonocyuwono Member Posts: 28
Hi

I create new form which contain 3 columns Tablebox (Type, Color and Qty ) let say the data come from table X. This table only have one field , Text (250) , this field is contains Type, Color and Qty . I have to parse this data in order to populate my tablebox inside my from.

I am parsing the record from table X On After Get record function on my form; everything works great , except the user don't have the ability to sort the data on the form.

Is the a way for me to do something so the the user will be able to sort by Color or Type on the form ?
Carlos Yuwono

Answers

  • XypherXypher Member Posts: 297
    Only way I can think of efficiently doing so would be to add 2 more fields to that table (and keys) and use it as a temporary table. Or use another table as a temp table that has the structure required to sort by the 3 fields you wish to populate with your parsed data.

    On the form load, populate the temporary table with the parsed information.

    But it would probably be better to have done the parsing prior to inserting the data to the database :wink:
  • cyuwonocyuwono Member Posts: 28
    how about if I MARKED the record


    IF FIND('-') THEN
    REPEAT
    WorkTextLine := "Raw Data 1" + "Raw Data 2" + "Raw Data 3" + "Raw Data 4";
    IF DELCHR(COPYSTR(WorkTextLine,45,1),'>',' ') = vFilter THEN BEGIN
    MARK(TRUE);
    END ELSE
    MARK(FALSE);
    UNTIL NEXT = 0;
    IF vFilter <> '' THEN
    MARKEDONLY(TRUE)
    ELSE
    MARKEDONLY(FALSE);
    FINDFIRST;


    vFilter will be the source for the text box (user input).
    Carlos Yuwono
  • XypherXypher Member Posts: 297
    If it works for you and you like it, go for it :)
Sign In or Register to comment.