FOROS PROFESIONALES
WINDEV
,
WEBDEV
y
WINDEV Mobile
Inicio
|
Mensajes recientes
|
Conéctese...
|
Desconectar
|
Español
Inicio
→
WEBDEV 2024
→
Return to the selected record
Return to the selected record
Iniciado por Henk Ouwejan, 30,abr. 2016 21:57 - 3 respuestas
Conéctese…
Henk Ouwejan
#1
Publicado el 30,abril 2016 - 21:57
Hi all,
Suppose the selected record in the table is number four. After modifying the record (using a form page) and returning to the table page always the first record is selected. I would like when returning to the table page the same record (no. four) is selected. What must I do change in my code?
Thanks in advance,
code I'm using now:
Table page, modify button:
IF TableSelect(TABLE_QRY_products)=-1 THEN RETURN
HReadSeek(products,id,TABLE_QRY_products.COL_ID)
PageDisplay(PAGE_Form_product)
Form page, validate button:
PageToFile()
HSave(products)
IF PreviousPage()<>“” THEN
PageDisplay(PreviousPage)
ELSE
PageDisplay(PAGE_Home)
END
Informar
0
0
Diego Sanchez
#2
Publicado el 05,mayo 2016 - 04:46
Here´s the code I use:
First create a global variable to hold the record you need to return to, type int or 8-byte int depending on your keys
example: MyGlovar
Then on your Modify or Update button:
MyGlovar = TableSelect(Table_MyQry)
Then when returning to the Products page on the initialization section
IF MyGlovar <> 0 THEN
Refresh your qry and
TableDisplay(TABLE_MyQry,MyGlovar)
END
Hope it helps
Informar
0
0
Henk Ouwejan
#3
Publicado el 09,mayo 2016 - 09:42
Hi Diego,
Yes it works. Thanks.
Informar
0
0
Stanley Barnett
#4
Publicado el 19,mayo 2016 - 05:08
"Global" seems to be overkill here...
Is there a concept of a private variable in wlanguage whereas it would be automatically released as soon as the code that created it was closed?
I say "private" because of my VFP background where we had local, private and public (global) variables. The scope of a private variable is seen by the process that creates it and all subsequent child processes. Global is seen everywhere and stays alive until the app is closed or the variable is explicitly released. And of-course local is only seen where it is called and nowhere else.
Thanks,
Stanley
Informar
0
0
→ Volver a WEBDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (versiones precedentes)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Búsqueda Tipo
Sólo temas
Todos los mensajes
Periodo Buscar
Cualquier fecha
Última hora
Última 24 horas
Última semana
Último mes
Último año
Cancelar
Vista previa del mensaje
Añadiendo una imagen
Importar una imagen desde una URL
Enviar una imagen desde un archivo de su disco
Arrastrar un archivo o click en "Examinar..."
o
Cancelar
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Texto