Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.databases.paradox    |    To crash or not to crash, asks Borland    |    9,834 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 9,440 of 9,834    |
|    Jim Giner to All    |
|    Re: changevalue not triggering with tabl    |
|    22 Aug 08 14:45:35    |
      From: jim.giner@suny.edu              You're not missing anything. It has to do with the table lookup I believe -       changevalue doesn't work the same way. What you have to do is trap in the       unlockrecord action and compare the 'new' value to the old value. basically,       read the underlying table before posting the new data.              Here's what I tried out - just a routine that demonstrates how you can see       the "prev." value before the update occurs at the record level, since you       can't capture it at the field level.                     At the form level do this:       method action(var eventInfo ActionEvent)       var        oldname string       endvar        if eventInfo.isPreFilter() then        ;// This code executes for each object on the form:               else        ;// This code executes only for the form:        if eventinfo.id() = dataunlockrecord then        oldname = blank() ; init this fld        if tc.locate(1,name) then ; record key is called 'name'        view(tc.attributes,"Old") ; attributes is the fld I'm tracking       changes on - this displays the old value        oldname = name ; save the record key if we found a 'previous'       version        endif        dodefault ; this will do the posting        if oldname <> blank() then ; make sure I had a prev. record - if       blank then I didn't        if tc.locate(1,name) then ; re-locate the old record        view(tc.attributes,"new") ; display the newly posted value        endif        endif        endif        endif       endmethod              *****       Of course, there's probably some clever-er way of doing this, but I've not       found it.              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca