|
| WINDEV 22 tabledispay ( get record position ) |
| Iniciado por guest, 04,mar. 2018 22:26 - 4 respuestas |
| |
| | | |
|
| |
| Publicado el 04,marzo 2018 - 22:26 |
Hi,
I have been working on a small project that needs be finnished yesterday < .
So I did fast coding. with screen to file ect working direct on files , sometimes a custom query.
Ok the problem
I have a table and a child table connected to that. ===> order ..==. orderline
If I add an order then after adding it I need to redisplay with tabledisplay( tablename, tainit) to get the last added record as well. Standaard after running this tainit the first row of the table gets selected ( because table is run again from start).
How do I get that selection on the last added record?
With the modify there is no problem , I select current record and it does fine.
I donnot want to work with tableaddline if possible . As said the app is due Yesterday.
Regards Allard |
| |
| |
| | | |
|
| | |
| |
| Publicado el 04,marzo 2018 - 22:35 |
Hello Allard
TableCount() returns the number of rows in a table so TableselectPlus(tablename,tablecount(tablename)) should take the cursor to the last line of the table.
Regards Al |
| |
| |
| | | |
|
| | |
| |
| Publicado el 05,marzo 2018 - 00:23 |
| |
| |
| | | |
|
| | |
| |
| Publicado el 05,marzo 2018 - 09:11 |
Hi Allard,
It's rarely the case that the last record added is also the last record in the file, so you'd better do a TableSeek in the table for an identifier and then position on that.
Kind regards, Piet |
| |
| |
| | | |
|
| | |
| |
Miembro registrado 16 mensajes |
|
| Publicado el 05,marzo 2018 - 10:39 |
Hi,
you need to identify the order you just added with an unique code, either line or code (ex: sOrderCodeVariable) and then seeking the column of the table that has that value
TableDisplay(Table_Name,taInit) TableSelectPlus(Table_Name,TableSeek(COL_OrderCode,sOrderCodeVariable)) |
| |
| |
| | | |
|
| | | | |
| | |
|