Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
5
Erster Beitrag:
vor 2 Monaten
Letzter Beitrag:
vor 2 Monaten
Beteiligte Autoren:
SolutionJ-Reg, Fabrice Harari

WB ..modified

Startbeitrag von SolutionJ-Reg am 21.06.2017 10:37

Hi

I've just found out that the ..modified feature is not available in Webdev (at least up to v20).

Is there a comparable feature that can be used in Webdev, i.e. to be able to check if one or more data fields have been changed?

Cheers
Reg

Antworten:

Hi Reg,

you will have to enumerate your fields, and compare their value to their original ones.

It is what I do everywhere, even if ..modified is available, because the way ..modified works does not suits me...

Did you know that if you have an empty field, if user enters 123, then deletes the 123 (os that the field is empty again), ..modified will answer true?

..modified means "the user did something in there" and not, the value is different, which is why I never use it...

Best regards

von Fabrice Harari - am 21.06.2017 10:57
Hi Fabrice,

I was aware of the limitation of ..modified but for most normal purposes it works well enough for me.

So I have to compare every data field's value to what it was? Do you mean to the underlying database table record value? What about fields that are not linked? Do you just store their original values when the page is opened?

Thanks for the help, it's very much appreciated.
Reg

von SolutionJ-Reg - am 21.06.2017 11:01
Hi again

of course, the exact way I do it depends of the purpose of the code.

If we are talking about knowing which fields of a record have been modified, I'm doing that in WXReplication, during the call to hmodify... At this point the file buffer was filled with everything from the fields, and I'm checking field by field against the original/current database record.

Of course, if you need to check BEFORE the hmodify (or if there is no hmodify), then you need to enumerate your field and do all the appropriate coding...

However, if you are in the first case, there is a source available for you with a full working example (my WXreplication open source system replicates only the modified fields, of course)

Best regards

von Fabrice Harari - am 21.06.2017 11:20
Ok, thanks very much for that, I now know what I'll be doing this afternoon :-)

von SolutionJ-Reg - am 21.06.2017 11:21
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.