Hi,

I think the listbox is a special case, the record is saved as soon as
you tab out of each column but before the on losing focus, on data
change etc events fire.

I'm not saying this is desirable/correct but that's what my testing
shows.  This log is sequential so from the top we have the following
events fire after I press tab (I've changed the name from rasta to
Fred Astaire in this example:

27/10/2016 17:33:28 OM: [Client].In.Col_pet_name (col) - On Display
Detail Name Fred Astaire rasta
27/10/2016 17:33:28 OM: [Client].In.Pet_i (lbox) - On Display Detail
Name Fred Astaire rasta
27/10/2016 17:33:28 FM: [Client].In - On Display Detail Name Fred Astaire rasta
27/10/2016 17:33:28 Trigger: On Saving Existing Record Event Name Fred
Astaire pasta

The log is only written when old(field) # field.

I wouldn't call it a bug but maybe 4D needs to revise the
documentation to reflect this behaviour.


Regards,

Wayne


Wayne Stewart
about.me/waynestewart




On 28 October 2016 at 10:17, Keith Goebel <keit...@clear.net.nz> wrote:
> Wayne, thanks for your reply.
> I’m not sure how this can help me.
> In several places I need to check the old value against the new value (when 
> the new value is entered) and take the appropriate action, which may include 
> resetting several other fields in the record.
>
> I know I could add a lot of code to manually store the field contents 
> whenever a record is loaded, and to update it whenever a field is changed, 
> but that will be a time consuming and clunky work-around for something that 
> is already inside 4D - somewhere.
>
> The v15.1 Lang Ref manual says:
> The Old command returns the value held in aField 
> <http://doc.4d.com/4Dv15/4D/15.1/Old.301-2685046.en.html#> before the field 
> was programmatically assigned a value or modified in data entry.
> …
> Old works on aField 
> <http://doc.4d.com/4Dv15/4D/15.1/Old.301-2685046.en.html#> whether the field 
> has been modified by a method or by the user during data entry.
> ...
>
> Since 4D v15.2 does not do this in a selection based listbox, does anyone 
> else think this is a 4D bug?
> Cheers, Keith
>
>> On 27/10/2016, at 7:54 pm,Wayne Stewart wrote:
>> Look at On Display Detail
>>
>> On 15 October 2016 at 10:19, Keith Goebel <keit...@clear.net.nz 
>> <mailto:keit...@clear.net.nz>> wrote:
>>> Kirk, thanks for your reply.
>>> I would have thought so too, but it doesn’t (for me anyway).
>>> The Old value, when tested by the On Data Change event, matches the entered 
>>> value not the value before the cell edit.
>>>
>>> Seems weird that nobody else on this list has a need to do this.
>>> I wish i could say “I’m first!” for things other than 4D “unexpected 
>>> features".    :-)
>>>
>>>> … I'm not sure how long you can count on modified changes NOT
>>>> being saved but I am certain OLD will work while you are editing that
>>>> specific field...
>>> **********************************************************************
>>> 4D Internet Users Group (4D iNUG)
>>> FAQ:  http://lists.4d.com/faqnug.html <http://lists.4d.com/faqnug.html>
>>> Archive:  http://lists.4d.com/archives.html 
>>> <http://lists.4d.com/archives.html>
>>> Options: http://lists.4d.com/mailman/options/4d_tech 
>>> <http://lists.4d.com/mailman/options/4d_tech>
>>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com 
>>> <mailto:4d_tech-unsubscr...@lists.4d.com>
>>> **********************************************************************
>
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **********************************************************************
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to