AnsweredAssumed Answered

Setting a flag field & record locking

Question asked by SteveMartino on Aug 19, 2017
Latest reply on Aug 22, 2017 by philmodjunk

Hello forum.  I had a question about setting a flag field with concerns for record locking. 

Currently I'm a single user for my database, but I'm always concerned about record locking (thanks to Jaymo !).

Right now I'm trying to set a flag field on a set of found records through a script with Replace Field Contents.  For a single user, in one window this will always work if the first script step is Commit Records.  But in a multi-user scenario, the flags will set for every committed record and skip the un-committed records.

So I know I can't just can't undo the Replace Field Contents because in theory, another record could be opened by another user before that executed, leaving a flag in a record.

Does anyone have any ideas as how to best proceed?

A few ideas, some worse than others, and in no particular order.

1.  Loop thru the found set and open each record.  Then after they are all open, set the flags.  I could then trap for an open record and stop the process.  This is probably my worse idea, just thinking.

2.  Change the flag field to a calculation, avoiding all record locking.  But is it possible (and if so, how?) to have the calculation only act on the found set of records?

3.  Or should I just abandon all 'flag' setting and instead of clicking to set/unset flags, use a script that extends or constrains the found set.  This may be easier, but I like the visual of a list showing checked records.

 

More info.

The basic premise is a picker window with two filtered portals, one with the found set (flags checked) and the other portal of remaining records that I could add to the found set (by setting the flag)

 

 

Any thoughts, help, guidance or questions are always appreciated.

Thanks

Steve

double portal.png

Outcomes