Mar 21, 2020 03:17 PM
Hi all.
I am working with a table that has a ‘Last Modified Time’ field. I am attempting to create a block script that when run deletes any records that table within 5 minutes of Last Modified Time field.
I am new to scripting so any help is appreciated!
Mar 23, 2020 09:44 AM
You’ll have to be more specific about this requirement.
Imagine it’s 10a and you decide to run the script to perform the deletions. There are many records with times that are far greater than 5 minutes ago. Are you saying that any items >= 5 minutes old should be preserved? What if you forget to run the script? Should it delete everything that is 5 minutes old or more?
Mar 23, 2020 02:22 PM
Hi Bill.
I actually didn’t consider all that! Yes, it would be better to delete records where the last modified time field falls within a date range. I like the control of having to run the script block when needed, even if it that mean forgetting to run it, which is not really to much an issue if I do.
Any further help is much appreciated.
Thank you.
Mar 23, 2020 02:39 PM
Precisely.
I recommend you explain all the nuances of what you’re looking to achieve because getting to the details is very costly in terms of time. Even go so far as to create a simple outline of the process steps with a few examples. Without details, people who know how to code it up, must also have to become your scribe and interpreter of what’s in your head. :winking_face: Once you do that, someone will jump on your idea to help.
Mar 23, 2020 02:57 PM
Bill,
Yes, fair enough.
Thank you for your help!
Joseph
Mar 23, 2020 03:06 PM
You bet. And with deeper details, you’ll get a much better solution.
So many [free] scripts have been shared here by community members who quickly learn they spent a few hours writing something without all the facts. Then the long and painful process of shaping the tool to do what was really needed begins.
Just as there’s a subtle difference between standing on the shore drunk and fishing, there’s an equally subtle difference between creating a script and actually implementing a script. :winking_face: