Myron, I think the solution would be to do what R:BASE is doing under the surface when it performs “concurrency control” when saving the date. If I’m not mistaken, R:BASE makes a copy of the “original” data and stores it before bringing a second copy of the same data into the screen form. When the option to SAVE data is initiated in the form R:BASE first goes back to the original row of data to retrieve a “fresh” copy of that data, then compares it to the “original” data to determine if change(s) were made to the “original” data while the user was editing that row of data in the form. If any column(s) in the “original” data were changed that information is OVERWRITTEN on the screen to show the user what changed while they were using the form. Then, the user can overwrite or accept the change(s) or modify accordingly. THEN, they can save the data again where another verification takes place, and if nothing has changed since the most recent “refresh” the data is finally saved to the table. This is a truly amazing process that R:BASE goes through to maintain data integrity. However, this data verification is not known until the moment the user decides to save data in the form. It is the FINAL check that R:BASE does before saving data to the table. The short answ3er to your question is simple, but complicated: Do what R:BASE does – concurrency control – inside the form:
1. Make a copy of the original data into variables 2. Get another copy of the same row at the time the user clicks the “save” button into different variables 3. Compare the original against the refresh data 4. If something has changed execute the desired processes 5. If nothing has changed then save the data Take all of this with a grain of salt, as my recollection of these processes may be faulty, or changed. If things have changed I need to get a “fresh” copy of the current processes. 😊 Steve From: rbase-l@googlegroups.com <rbase-l@googlegroups.com> On Behalf Of myron.fineg...@gmail.com Sent: Sunday, December 3, 2023 7:26 AM To: rbase-l@googlegroups.com Subject: [RBASE-L] - Know when data has been changed in a row of data in a table. Subject: Know when data has been changed in a row of data in a table. Background: 1. Using a form to enter or change data that is in a row in a table. 2. The application has code in place to record who is logged into the system. 3. When exiting, with or without data changes to the row of data, the form has code in the exit button that uses an update command to take the logged in username and update the column in the row of data ‘last updated by’. 4. Goal: only do that update if the data has actually been changed. R:Base has a way to check if data has been changed in a row of data when a table is opened and a column in a row has been changed. The save button on the bottom of the screen (the check mark) changes from grey to a color. Is there a way to know, using code, if the data in a row in a table has changed? This would allow control over the update statement on exit. Thanks in advance. Myron Finegold -- For group guidelines, visit http://www.rbase.com/support/usersgroup_guidelines.php --- You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to rbase-l+unsubscr...@googlegroups.com<mailto:rbase-l+unsubscr...@googlegroups.com>. To view this discussion on the web visit https://groups.google.com/d/msgid/rbase-l/012801da25fc%24f9748400%24ec5d8c00%24%40gmail.com<https://groups.google.com/d/msgid/rbase-l/012801da25fc%24f9748400%24ec5d8c00%24%40gmail.com?utm_medium=email&utm_source=footer>. -- For group guidelines, visit http://www.rbase.com/support/usersgroup_guidelines.php --- You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to rbase-l+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rbase-l/BYAPR03MB3718B41876687C23C2FBDB948987A%40BYAPR03MB3718.namprd03.prod.outlook.com.