PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → [WD17] - How to set Creation/Modification Dates for each rec automatically
[WD17] - How to set Creation/Modification Dates for each rec automatically
Iniciado por guest, 27,abr. 2015 13:44 - 2 respuestas
Publicado el 27,abril 2015 - 13:44
I am try to get HFSQL Classic to automatically populate two fields:
1. RecCreationDate (When a new record is added)
2. RecModifiedDate (Whenever a record is modified)

Both these fields are date fields.

But I am not able to make any progress. Is it possible to achieve this at HFSQL level instead of programming it using WLang?

TIA

Yogi Yang

PS.: I also want to achieve something like this in case of Android App that we have developer. I don't know if it would be possible for this or not... also...
Publicado el 27,abril 2015 - 14:24
Hi

personally, for filling automatic fields in ALL cases (android also), I just create a global procedure called hadd that overwrites the regular one

In it, I do the filling by code, once, and then call the original hadd via wl.hadd

In fact, I use this system for much more than automatic fields, as it is the basis of my wxreplication system

Best regards
Publicado el 27,abril 2015 - 15:17
You can describe one trigger before for the files you want and fill the content you need.
http://doc.windev.com/en-US/index.awp…

For android the only way is the way described by Fabrice, overloaing the function to
http://doc.windev.com/en-US/…

If you want to do it at HFSQL level you can't use it in classic mode only in HFSQL C/S mode, check server triggers in the help
<a class="ExternalLink" rel="nofollow" target="_blank" href="http://doc.windev.com/en-US/?3044369">http://doc.windev.com/en-US/&hellip;</a>