FOROS PROFESIONALES
WINDEV
,
WEBDEV
y
WINDEV Mobile
Inicio
|
Mensajes recientes
|
Conéctese...
|
Desconectar
|
Español
Inicio
→
WINDEV 2024
→
[WD20] - How to re Init a Entry window without closing it
[WD20] - How to re Init a Entry window without closing it
Iniciado por Yogi Yang, 19,feb. 2018 13:31 - 7 respuestas
Conéctese…
Yogi Yang
#1
Publicado el 19,febrero 2018 - 13:31
Hello,
I am finding it hard to explain as to what I want but let me try.
I have a well designed Data Entry Window.
When the user clicks on Validate button it validates the data and save the entered data to a file and closes.
Now the users want an option where it I should save the entered to a file and become blanks again to that they can enter new data in it without having to close the window and then reopen it.
How can we keep Window open and reInitialize (make it blank) after saving user entered data?
I hope I have managed to explain my requirement.
TIA
Informar
0
0
Gianni Spano
#2
Publicado el 19,febrero 2018 - 13:44
Hello Yogi.
If i understand well your requirement, To reinitialize a form after a save, use "Reset ()"
HTH
Gianni
Informar
0
0
Al
#3
Publicado el 19,febrero 2018 - 13:48
Hello Yogi
If you also need to run the init code of the window fields then InitWindow() will be required.
Regards
Al
Informar
0
0
Fabrice Harari
#4
Publicado el 19,febrero 2018 - 13:48
Hi
and/or you can do an executeprocess(WindowName, trtInit)
Best regards
Informar
0
0
Yogi Yang
#5
Publicado el 19,febrero 2018 - 14:26
Hello and Thanks everyone!
It is working. Only thing that I had to add was HFlush("*") after saving data.
Regards,
Informar
0
0
Art Bonds
#6
Publicado el 19,febrero 2018 - 15:50
Quote
Yogi Yang
Hello and Thanks everyone!
It is working. Only thing that I had to add was HFlush("*") after saving data.
Regards,
In my opinion, I don't think hFlush alone will do it. All hFlush does is commit the data to disk. It does not clear out all the data on the screen or prefill any mandatory data, etc.
Informar
0
0
DerekT
#7
Publicado el 19,febrero 2018 - 17:00
I would agree with Art
What I do is
In the window global declaration
Declare a Record type variable - MyContact is a Record of Contact
Bind each window control 'by Variable' to MyContact
In the whenever modifying code block of each control use ControlToSource()
Following your Save add the code
HresetVariable(MyContact) //Reset all columns to their default values
SourceToScreen(MyWindow,MyContact) //Refresh the displayed values
Informar
0
0
Yogi Yang
#8
Publicado el 20,febrero 2018 - 07:40
Quote
Art Bonds
In my opinion, I don't think hFlush alone will do it. All hFlush does is commit the data to disk. ...
That is exactly what I had to do because after re-initializing the window when a user selected an Invoice I have to show calculations as to what was the last invoiced amount as well as total amount of all invoices for a given financial year, and this was coming wrong until I used hFlush.
TIA
Informar
0
0
→ Volver a WINDEV 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