9 Replies Latest reply on Jan 23, 2014 10:57 AM by carolej

    Guests each get globals?


      I just want to confirm what my understanding is and what my tests indicate. Don't want any surprises when this IWP DB goes public.

      This IWP DB will be hosted by Server. It uses the auto-Guest login.

      1. That each Guest is seen by Server as a distinct user (I guess via IP?) so what one Guest does won't affect what another Guest does?

      (Other than the usual trying to save changes to the same record limitation.)

      2. That they each get their own global storage fields so again what one does doesn't affect the other?

      (I know their changes to global fields won't be saved. It's just for them to enter something for the moment.)

      (Also these are just text globals, not calculations.)

      3. The same for variables in scripts, they have their own, one Guest doesn't affect the other?



        • 1. Re: Guests each get globals?

          Yes, njem:


          You've got everything just about right, with respect to global fields and variables. If one user changes a global field, the other user will neither see nor be affected by that change and can change the field as needed. Point one: Globals don't lock records, though. Point two: While globals are not 'saved' among multiple users, you do need to be aware that globals will 'save' their contents upon being closed by FileMaker Pro when not hosted by FM Server. That means that just before you upload your file to FM Server, be sure the globals contain or do not contain data as appropriate (if any contain data, that will be the default for each user upon logging in, once hosted). You might solve this by having the globals 'cleared' via script steps in the OnLastWindowClose triggered script.

          • 2. Re: Guests each get globals?
            Stephen Huston

            And if there are default values for any globals which you want users to start with, be sure to set them as part of an OnFirstWindowOpen triggered script in the file options so they will always contain the corect defaults.

            • 3. Re: Guests each get globals?

              Thanks folks.

              • 4. Re: Guests each get globals?

                Hello Njem,


                I believe that there is actually an important distinction that needs to be teased out, given that you have mentioned IWP:


                  The IWP record locking situation is different from one what one comes to expect when you are used to working in a FM client multi-user environment.



                In particular:


                Entering a global field in IWP usually will lock the entire record.


                The IWP system is not discerning enough to be able to know that a user is entering just a global field and will edit only a global field.  Within the "brains" of IWP, it only knows that the user has entered some field in the record, and that he or she may edit the field contents.  Not knowing that the field in question is a global, IWP locks the entire record, and consequently other users will be locked from making changes to other fields of the record in question.



                Sample File:


                I'll attach a simple sample file to illustrate.  The file consists of a single table with two fields: a global field, and a non-global field.  There is only one record in the table.  If you open the file in IWP, it should take you to a layout that only shows the global field.  If you then enter that field, IWP will lock the record, and you can see this by attempting to use your FM client to try to edit the contents of the standard field.  Under non-IWP circumstances you would not expect that a user editing only a global field in one session would lock another user in a different session from editing the same record.  Hopefully the file will illustrate that this scenario plays out differently in IWP.



                Please let me know if this is not clear enough;  I hope this helps.


                Kind regards,



                • 5. Re: Guests each get globals?

                  I found this out the hard way. I have a form that uses globals to create new records via IWP but only one user could be in the system at one time!

                  • 6. Re: Guests each get globals?

                    Hello Carolej,


                    We're you able to work around this ok?





                    • 7. Re: Guests each get globals?

                      Hi Steve -


                      I'm going to try creating temporary records in the global file, then delete them periodically. Seems like the simplest solution, although a bit "klugey".



                      • 8. Re: Guests each get globals?

                        Hi Carole,


                        Your proposed solution does seem the most straight-forward.


                        Reading your post, it occurred to me to mention:


                          If you could show the user the UI in Find mode, you would be able to have them enter data into regular (i.e. non-global) fields without any concerns about record locking, and then procede with your scripting as you had originally intended.


                        The above said, I think I prefer the solution that you propose a little bit better -- if for no other reason, it would be more clear for another developer to be able to pick up and readily comprehend.


                        Very best regards,



                        • 9. Re: Guests each get globals?

                          Thanks for the feedback, Steve. The same script is used for IWP and direct FMP, so I think I'll stick with the record creation idea.