LaRetta Posted October 5, 2005 Posted October 5, 2005 Hi Everyone, Modification date, timestamp etc. changes whenever data changes in any field. It tracks records changes. That's great. But I want more. I want a modification Timestamp which I can tell to ignore (at the start of a script, for instance) the following script data changes, ie, set a global field called ModFlag (number) with 1 to stop the TimeStamp until end of script when ModFlag is again set to 0. Or activate/deactivate depending upon Privilege Set or AccountName. I'll use a regular Modoficiation Timestamp also but I have certain fields which I want to EXCLUDE from the 'record change' tracking. And a simple maintenance script, import, etc. can wreck the value of the Modification date. I only want to know when USER actions have modified a record and scripts activated by a User would not have this 'off switch'. All I can come up with is using Evaluate() on an Auto-Enter (Replace) TimeStamp and inserting EVERY field, wrapped with If ( not Mod ; Evaluate ( yada yada ) ! I think I want to use Get(CurrentHostTimeStamp). Have others had this desire and if so, are there better ways of handling it? I would like to pull this process into all of my tables. Thank you! LaRetta
Fenton Posted October 5, 2005 Posted October 5, 2005 I figured out something for this, so I could replace my own "today" date without triggering a modification. It was definitely pre-7, and it used a lookup, which are not that hard to turn off, into a separate field. There is probably a better more modern way. I was also using for a routine with all records. I set and cleared the global during a zero found set. That way removing the global would not trigger the lookup (which it would otherwise). I just tried this in 7, and removing the global still triggers the modification date, unless you're in a 0 found set. This would not work so well for ordinary scripts. Another solution would put the global in a utility table, since the trigger field is unstored anyway. Or use the new Go To Related Record [] method to save the found set into an unrelated TO, go to a 0 found set, then restore the found set. I like that better. But I'm too tired to actually do it. Mañana, as we say. Today_Mod.zip
LaRetta Posted October 15, 2005 Author Posted October 15, 2005 Hi there Fenton I didn't want you to think I missed this response or that I discounted it ... indeed the opposite! Wow. It's just taking a bit to run this through my synapses. Using your theory, I believe I'll be using SecureFM w/Menu Magic to trigger it. SecureFM for 8 just came out and I have some catching up to do on the changes first. Your demo spurs many additional ideas besides controlling modification date! Double-wow. My mind is firing in all directions and I will be reviewing (and pulling in) other processes because of it. Thank you so much! I will learn much from this outstanding example and the principles imbued from it! LaRetta
Fenton Posted October 15, 2005 Posted October 15, 2005 Thanks. I thought it was a nifty script when I built it (a while ago). To give credit where credit is due, it was from Illyse Kazar that I got the idea of using a separate lookup field to use for the visible modification date. I didn't use a plug-in for a trigger, I just ran the script at startup. I also included it in the main navigation script for that table; in case a really lazy person didn't close the file overnight. The test to see if it should run is instantaneous, because it only compares the current date to one record in the table. The reasoning was that the "today" field will be the same in all records, so you only need to test one.
comment Posted October 17, 2005 Posted October 17, 2005 I only want to know when USER actions have modified a record and scripts activated by a User would not have this 'off switch'. In addition to a regular LastModified field (auto-enter modification timestamp), define another timestamp LastUserModified field with auto-enter (replace) calc: Case ( IsEmpty ( Get (ScriptName) ) ; LastModified ; LastUserModified )
Fenton Posted October 17, 2005 Posted October 17, 2005 I thought there should be a more modern way. But I wouldn't have thought of something so generic and elegant.
LaRetta Posted October 17, 2005 Author Posted October 17, 2005 But I wouldn't have thought of something so generic and elegant. Neither would I! And yes it is elegant. And it's also opened up more ideas for Auto-Enter (Replace) calculations with some other Get() functions. Thank you, Michael! LaRetta
Recommended Posts
This topic is 7075 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now