> On Oct 31, 2017, at 1:53 AM, Chip Scheide via 4D_Tech <[email protected]> 
> wrote:
> 
> .... field modified = field modified --right?!?!

You bring up a very interesting point. I thought the answer was No it did not 
have to be modified. but after testing I discovered, however, that while you a 
field saved to itself does not have to be modified to set the dirty flag, you 
must specifically  save an object field that was modified using dot notation to 
itself in order make it stick even if the dirty flag is otherwise set by 
another field modification. My observations…

ALL RECORDS([Patient Record])
[Patient Record]Test.testing:=“NewTest” 
SAVE RECORD([Patient Record])
//NOTE:  Testing = “test” before, and remains “test” after the save. The table 
trigger did not fire.

ALL RECORDS([Patient Record])
[Patient Record]Test.testing:=“NewTest” 
[Patient Record]Test:= Patient Record]Test
SAVE RECORD([Patient Record])
//NOTE: The table trigger fired and the object was updated. Yeah!

ALL RECORDS([Patient Record])
[Patient Record] Test.testing:=“NewTest” 
[Patient Record]Comment:=“Comment”
SAVE RECORD([Patient Record])
//NOTE: The table trigger fired and the comment field WAS updated. But the 
object field WAS NOT updated. BOOO!

ALL RECORDS([Patient Record])
[Patient Record] Test.testing:=“NewTest” 
[Patient Record]Comment:=“Comment” 
[Patient Record]Test:= Patient Record]Test
SAVE RECORD([Patient Record])
//NOTE: BOTH fields were updated and the trigger fired,

I think that this tells me that the dirty flag explanation is BS. It is simply 
a bug in field dot notation. In the 3rd test the record was certainly set to 
dirty and the record was in fact saved as updated exept for the object field 
did not update.

I just this morning received the following with regard to the bug report that I 
filed months ago about this...

----------
Subj: [137286] Modifying c_object field with dot notation does not work as 
expected

Sorry for the bad news!

It looks like this bug ACI0097454 was marked as Standard Behavior on October 
24th. 

If you would like to see the standard behavior changed then you could file a 
feature request on the Forums. I think that may be a great idea because it 
will, at the very least, raise awareness to this behavior.
—————
 
I will try to follow up on this when I can find a bit of time to pursue further.

John



John Baughman
Kailua, Hawaii
(808) 262-0328
[email protected]





**********************************************************************
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:[email protected]
**********************************************************************

Reply via email to