KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: When is your data saved in an enterable list?
PRODUCT: 4D | VERSION: 11.6 | PLATFORM: Mac & Win
Published On: April 2, 2010

When dealing with a List Form that has been opened with the "Enter in list" option authorized with MODIFY SELECTION it can be difficult to know when your records get saved. Does a record get saved when you leave the record and go to another record in the list? Does it get saved when you tab out of one field into another? Does it get saved when you just close the list form? There are many different times that a record may or may not be saved.

To test this for specific cases one thing you can do is add code into the trigger method for a given table and test based on the event On saving existing record. Something as simple as saving something to the pasteboard when a record is saved using SET TEXT TO PASTEBOARD.

Based on testing, the records in a list form are saved whenever an edit has occurred and the current record in the form loses focus. This can happen when you change windows in your application or just tab to the next record. So long as the given record has focus in 4D though, the changes are not saved.