5 Replies Latest reply on Feb 14, 2016 9:33 AM by Steve Wright

    Multi-user Global Field Collisions?

    SteveFransen

      This script finds records dynamically. It is called using an OnObjectModify script trigger set for System::SearchData so it fires each time a character is typed into System::SearchData.

       

      System::SearchData and System::Count are global fields. In the case where I'm using this script to find ICD10 codes the find request is: ICD10::ICD10LongDescription = *$SearchData*

      Script.tiff

      Will unexpected behavior occur in a multi-user environment If two users are using this script simultaneously? In other words, will their simultaneous use of System::SearchData and System::Count collide or do they each have their own "instance" of System::SearchData and System::Count?

       

      Thanks,

      Steve

       

      Ps. The ICD10 Code table has just over 85,000 records. I'm definitely open to suggestions if there's a better, faster, way to dynamically search tables with large numbers of records... especially since I'd like to do this from FIleMaker Go over a WAN.

        • 1. Re: Multi-user Global Field Collisions?
          coherentkris

          Global fields are 100% local to the session.

          There will never be a cross session issues with any global unless you expect two sessions to have the same value in a global

          • 2. Re: Multi-user Global Field Collisions?
            Extensitech

            Global fields are not shared across user sessions. User A and User B can store different values in the same global field, and neither can "see" or "collide with" the other user's value.

             

            One thing to potentially watch out for is that if your global field had a value in it when it was last closed in "standalone" (non-server) mode, then that value will be the value in the global for any user when they first open the file. Even then, though, if they change the value it only changes for them.

             

            HTH

            Chris Cain

            Extensitech

            • 3. Re: Multi-user Global Field Collisions?
              siplus

              1) no collision if the fields are defined as global. Every user has his own instance, as you correctly supposed.

               

              2) in a WAN setup I'd rather put a "find" button to be clicked once the ICD10 search term has been defined, instead of a search-while-you-type interface. Less is more.

               

              3) If you really want the search-as-you-type feature, fire the search only when they typed at least 4 chars (change your first script line to > 3)

               

              4) worth trying: a relationship between a global field and your ICD10 table. OnModify,  you run a PSOS with Exit Script [executeSQL("SELECT ICD10Code FROM ICD10 WHERE Description LIKE ?";"";""; "%" & $SearchData & "%")] and set the global field to Get(ScriptResult).

              • 4. Re: Multi-user Global Field Collisions?
                SteveFransen

                Thanks for your reassurance about "collision avoidance," and I'll try your three suggestions for optimizing the performance!

                • 5. Re: Multi-user Global Field Collisions?
                  Steve Wright

                  siplus wrote:

                   

                  3) If you really want the search-as-you-type feature, fire the search only when they typed at least 4 chars (change your first script line to > 3)

                   

                   

                  I wish FMI followed this advice for the searching  of scripts / layouts etc

                   

                  Although I don't use 'search as you type' lately, I did come across a good idea and way to implement it a while back.  Using an ontimer to trigger the search when the user has finished typing, rather than on every keypress:

                  Building a Timed-Delay Search Filter for WAN Performance