1 2 Previous Next 17 Replies Latest reply on Aug 23, 2016 8:19 AM by DavidJondreau

    Prevent utility table record lock

    Tom_Droz

      I have a multiuser solution (FM14, windows) where I uses a utility table (one record) that acts similar to global setting in various layouts.

       

      I have a situation where a user is editing an entry that is in the utility table and leaves the mouse there locking out any other users from making changes to the table.

       

      I have 30+  places this table shows up on in various layouts.  Is there a easy way to periodically auto save data in the utility table to limit the record locking when a user stays in one of these various fields?  Or some other method to prevent the record locking?

        • 1. Re: Prevent utility table record lock
          philmodjunk

          Maybe global fields would be a better answer. A script could copy the current value to a global field, the user edits teh global and then another script "saves" the data by copying it back to the original record and field.

           

          If you want to try the periodic save trick, you can use an OnTimer controlled script to commit records every so many seconds.

          1 of 1 people found this helpful
          • 2. Re: Prevent utility table record lock
            KenNewell

            Can you clarify how the utility table is used?  If you have a single record what is the user editing that causes the lock?

            • 3. Re: Prevent utility table record lock
              keywords

              I think you could have the user create a new record in the utility table when they go to it, and then destroy that record when they complete the task? That way each user would have their own record each time they access the table and any locking issues would only apply to that record.

              • 4. Re: Prevent utility table record lock
                Tom_Droz

                Globals are not the answer for my solution.  The ontimer would be great if I could have it just affect that table and it dosent use up too much resources.  Not sure, I have 100 identical databases (Structure wise) running on my server.

                • 5. Re: Prevent utility table record lock
                  Tom_Droz

                  Hi Ken

                  The utility table is like globals except all users have the same data, there is only one record with a 200 fields, some that are edited on a semi regular basis by the end user

                  • 6. Re: Prevent utility table record lock
                    philmodjunk

                    Timers created by install OnTimer are specific to a given window, one timer to a window so I don't see a problem.

                     

                    But I also see no problem in using globals. Feel free to explain why you indicate that "globals are not the answer".

                    • 7. Re: Prevent utility table record lock
                      KenNewell

                      What you really need to prevent lock is a user table with a record for each user.  Don't sell Globals short here they can work great in a utility table one record concept.

                      • 8. Re: Prevent utility table record lock
                        keywords

                        Which is more or less what I suggested earlier in this discussion.

                        • 9. Re: Prevent utility table record lock
                          Tom_Droz

                          My utility table is used for customized pull down list, personalized business information and a 100 other items.  It is hosted and the data is the same for all users of that database.

                           

                          Creating globals just adds a lot of overhead and work to a complex database

                          • 10. Re: Prevent utility table record lock
                            keywords

                            My suggestion is not to create globals, but to have each user create a record when they access the utility table and then destroy it when they leave—you could easily script that process. That way any user who locks a record will only lock their own record, not any other user's. You would have to set security to prevent them accessing any record other than their own, but it would solve your problem.

                            • 11. Re: Prevent utility table record lock
                              Tom_Droz

                              I don’t see how that would work, they edit the record then it is deleted and the edit is gone.

                              • 12. Re: Prevent utility table record lock
                                keywords

                                Fair enough, but I'm sure there would be a way around that. Nevertheless, maybe that's not the answer after all. You say the utility table contains "personalized business information" but also "data is the same for all users", from which I infer that you must be storing some sort of standing data which users need to be able to edit from time to time. I also assume this means the edits one user makes will overwrite the existing standing information. The usual way you would manage that scenario is something like:

                                1.     Standard fields that store standing data

                                2.     Matching global fields that are populated whenever the file is opened, which make this standing data available to users (i.e. they don't have direct access to the standard fields)

                                3.     If you then want them to be able to edit the standing data from time to time, you would tightly control that process via scripts in order to maintain data integrity—e.g. make the edits in a global field, then pass it to the standard field.

                                4.     If you were allowing this edit process, you would also be wise to have a detailed audit trail system for all the standing data fields (e.g. NightWing's Ultralog) so you have some chance of tracking who is doing what and rolling back stuff-ups.

                                • 13. Re: Prevent utility table record lock
                                  philmodjunk

                                  Much of what you describe does not require that the user modify the table but rather are cases where your user is accessing data from that table for uses such as a value list. That type of access does not require having the user open a record in the utility table for editing.

                                   

                                  It also sounds like you have a single record with either repeating fields or multiple values in the same field and lots of different fields in the same record for different utility uses.

                                   

                                  If that's the case, you might break that record up into multiple records. This can make any editing tasks that take place only lock one small record out of many--which will greatly reduce if not eliminate the locking issues.

                                  • 14. Re: Prevent utility table record lock
                                    DavidJondreau

                                    You'd get better recommendations if you posted actual pieces of the system. A clone would be best, but not always feasible. Screenshots of the layout in both Browse and Layout mode, and a screen shot of your relationship graph would be a great start (and maybe finish).

                                     

                                    Without that, I'm trying to image the scenario. You have a single record table that contains information that all users edit? That's unusual. Are the actual data tables simply related to this utility table?

                                    1 2 Previous Next