8 Replies Latest reply on Jan 20, 2015 11:03 PM by gavjuan

    Script affecting unrelated layouts

    gavjuan

      Title

      Script affecting unrelated layouts

      Post

      I recently created a script with a runtime to close an inactive field when no user was accessing it. I noteiced today that the script seeems to be affecting other layouts in the same DB. Is there a table somewhere where I can see what the script is attached to?

      Thanks

        • 1. Re: Script affecting unrelated layouts
          philmodjunk

          Use the Database Design Report to check for that. There are also third party produced tools such as BaseElements that can take the XML form of the DDR and generate a very useful data base for checking such references more effectively.

          • 2. Re: Script affecting unrelated layouts
            gavjuan

            Hi Phil - thanks for your immediate reply. I checked and the report doesn't show any layouts directly using the script in question, and yet, if I disable the Commit Script the problem stops. Any suggestions?

            • 3. Re: Script affecting unrelated layouts
              philmodjunk

              This script will commit records on any layout that is current in the same window at the time the timer counts down. So if this script is started up, and then you change layouts, you'll experience a commit records on the layout you changed to once 30 seconds have elapsed.

              • 4. Re: Script affecting unrelated layouts
                gavjuan

                Thanks again - is there a way to restrict the Commit to the one layout only and not affect any others?

                • 5. Re: Script affecting unrelated layouts
                  philmodjunk

                  It depends on what you really want this script to do. The script could return to the correct layout as part of the script that commits records. But I'm guessing that you only want this to happen if the user is till on the correct layout. If so, I'd use the exit Layout script trigger (see Layout Setup.. for layout based script triggers) to cancel this timer when the user leaves this layout. This can be done by using a script with another Install OnTimer Script, but with no parameter specified for the time interval. (Keep in mind that changing layouts automatically commits records on the layout being exited.)

                  • 6. Re: Script affecting unrelated layouts
                    gavjuan

                    We have a layout that we use for Daily Tasks - pretty much a single field. Each member has a record that is added to/edited by everyone. It often happended that the editior didn't de-select the field and locked everyone else out. I had added a Timeout script that gave the editior 60 seconds to complete before they were ejected. One could of course, re-select the field to conitnue as 60 seconds often wasn't enough time. This new script (Timeout Timer + Commit) allowed the editior to remain on the record indefinitely until they stopped typing and navigate away to another layout but with the problem now experienced. There is probably a better and correct way to affect this?

                    I hope I have expained this clearly?

                    • 7. Re: Script affecting unrelated layouts
                      philmodjunk

                      In my last post, I suggested that you use an OnLayoutExit trigger to cancel this timer. That should do the job for you.

                      • 8. Re: Script affecting unrelated layouts
                        gavjuan

                        Ok, I wasn't certain. Thank you