AnsweredAssumed Answered

Records lost running a script

Question asked by FilmUser on Oct 9, 2017
Latest reply on Oct 9, 2017 by FilmUser

I am one of two administrators for a data base used by 10 –
25 folks at a time. The content is about products, each record being a product
with a code number.

I have a script which duplicates records, then prepares the
record to become a new code number. The script dupes the record, then immediately
moves the code number to a “reference code” field, then empties the code number
field, along with 20 or so other fields, all of which always change, but leaves
many fields untouched as these attributes of the new record remain the same.
The script I’ve described then is used by a loop to perform on from 2 or 3 to
as many as 30 records. This is a very popular script and is used daily.

Occasionally, the user gets a message that indicates that I’m
doing something, the user dismisses the message, and the result is usually some
loss in original records, meaning that they don’t get duped (or something gets
deleted) and/or changes are made to the original record. (I’m trying to get the
users to actually read and let me know what the message says.)

I don’t know if the message always has my name, but their assumption
is that I’m “doing something” administrative and losing their records. I could
be in field definitions at the time they run the script, or the issue could be caused
by other users, or even me, that are active in the records being duped.

Is there a script step that looks for such conflicts, which
could run before the loop which would warn them to exit? Or some other solution,
like a calculation field that monitors activity on that record? I would want the
qualifier to evaluate all records being duped. The script takes usually no more
than 10 seconds to run. We have backups and can always reimport the data, but
would rather avoid this. I could make changes to the data base only at certain
times, but that will restrict my ability to respond to requests for changes or additions,
and wouldn’t cover other users being in the records at the time the loop script
is run.