FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WINDEV 2024
→
[WD20] - How to re Init a Entry window without closing it
[WD20] - How to re Init a Entry window without closing it
Débuté par Yogi Yang, 19 fév. 2018 13:31 - 7 réponses
Connectez-vous…
Yogi Yang
#1
Posté le 19 février 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
Signaler
0
0
Gianni Spano
#2
Posté le 19 février 2018 - 13:44
Hello Yogi.
If i understand well your requirement, To reinitialize a form after a save, use "Reset ()"
HTH
Gianni
Signaler
0
0
Al
#3
Posté le 19 février 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
Signaler
0
0
Fabrice Harari
#4
Posté le 19 février 2018 - 13:48
Hi
and/or you can do an executeprocess(WindowName, trtInit)
Best regards
Signaler
0
0
Yogi Yang
#5
Posté le 19 février 2018 - 14:26
Hello and Thanks everyone!
It is working. Only thing that I had to add was HFlush("*") after saving data.
Regards,
Signaler
0
0
Art Bonds
#6
Posté le 19 février 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.
Signaler
0
0
DerekT
#7
Posté le 19 février 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
Signaler
0
0
Yogi Yang
#8
Posté le 20 février 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
Signaler
0
0
→ Revenir à WINDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (précédentes versions)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Type de recherche
Uniquement les sujets
Tous les messages
Période de recherche
Date indifférente
Moins d'une heure
Moins de 24 heures
Moins d'une semaine
Moins d'un mois
Moins d'un an
Annuler
Aperçu de votre message
Ajouter une image
Importer une image depuis une URL
Envoyer une image depuis un fichier de votre disque
Déposez ici un fichier ou cliquez sur "Parcourir..."
ou
Annuler
0%
WLangage
SQL
XML, HTML
JAVA, Javascript
Texte