Welcome! Log In Create A New Profile

Advanced

WD4 - Still table sorting problems.

Posted by AadG 
WD4 - Still table sorting problems.
May 15, 2020 02:59PM
Hi all,

I have a table standard sorted on "XXCleunik". I want to give my users the opportunity to sort their tables and use "Store the sort". So when the application is restarted the sort order of the table is the way the customer wants.

When the table is initialized it is sorted in the right way, like the customer wants, but the selectionbar is focussed on record 1 in the file. Is there a way to put the selection bar on the first record in the table and not the first record in the file ?

Best regards,

Aad



Edited 1 time(s). Last edit at 05/15/2020 03:00PM by AadG.
Al
Re: WD4 - Still table sorting problems.
May 15, 2020 09:37PM
Hello Aad

Tableselectplus(tablename,1) should do that

Regards
Al
Re: WD4 - Still table sorting problems.
May 15, 2020 09:59PM
Hi Al.

This is exactly what I did. Placed in "End of initialization of table...". It ends on record 1 somewhere halfway the table.
Do you think I'm using it in the correct way ? It seems that the sort is taking place first and then the record is pointed in the table.

Best regards,

Aad
Re: WD4 - Still table sorting problems.
May 15, 2020 10:11PM
Hi Al.

I tested it with a button with this code and this works well, so I have to experiment and put the code on an another spot.
Thanks for your reply.

Best regards,

Aad

** Edit ** When I put a button in the window with TableSelectplus(table,1) it does the trick. I put this code in every segment of the table and of the window and you see the first record in the table is choosen and after that it jumps to record nr. 1 of the file, so it seems that sorting of the table takes place even after "End of initialization of Window" confused smiley



Edited 2 time(s). Last edit at 05/15/2020 10:56PM by AadG.
Al
Re: WD4 - Still table sorting problems.
May 16, 2020 03:15AM
Hello Aad

That's good to know.

99% of my tables are memory tables so after they are filled I sort - if required - find a record if required using tableseek() and then issue a tableselectplus() command to either the first row or the found row number.

Regards
Al
Re: WD4 - Still table sorting problems.
May 16, 2020 12:26PM
Hi Al,

I think the main problem here is TableDisplay. It messes up things and gives unpredictable results. Very unusable in my case. You say you are using memory tables. Do you mean "table loaded in memory" as opponent of Direct access ?
With Direct access TableDisplay seems to work OK, but then I cannot sort my columns the way I want, so I think keep using "table loaded in memory" and make a workaround TableDisplay.

Regards,

Aad



Edited 2 time(s). Last edit at 05/16/2020 12:28PM by AadG.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: