2 Replies Latest reply on Jun 2, 2016 3:09 PM by bluelantern

    Multi-User WebDirect Design Issues


      I have designed a WebDirect application hosted on a FM Server intended for Web use only.  The signup form uses global variables to collect information about the client then commits them to the database (including creating a user with password). 


      My question is:  if many users try to sign up at the same time, will the input make a mess of the global variables that I am using on the registration layout?  I am concerned that two or more users will try to use the layout form at the same time (intentional) and that the data may overwrite another users data.  How does Filemaker handle this situation?  What is the 'correct' design for an application like this?

        • 1. Re: Multi-User WebDirect Design Issues



          Variables in a script are always session based. This means "User1" will have its own iteration of a Global Variable and "User2" will have their own iteration of a Global Variable. One session would never be able to over-write another sessions global variable. See Set Variable


          A local variable can only be used in script steps in the currently executing script. The value in a local variable is cleared when the script exits.



          A global variable can be used in a calculation or script anywhere in a file, for example, other scripts or file paths. The value of a global variable is not cleared until the file is closed.


          I hope this helps!



          FileMaker, Inc.

          • 2. Re: Multi-User WebDirect Design Issues

            Two common ideas:


            1.) Use a session record that is created upon login and tied to the user.  You can throw what ever fields you want into that session table.  That form should be on layout for that session record.  Upon exit migrate the data to another table.


            2.) Create a table specifically for global fields.  NEVER allow a record to be created in that table to avoid multi-user collisions.  Those global fields will always be available regardless of what layout your on.  Reset them as needed.


            Both ideas apply equally to Pro, Go, WebDirect.