3 Replies Latest reply on Feb 21, 2017 7:14 AM by beverly

    Different settings for different users simultaneously

    guessmaster

      I have a large database for one user with global fields to insert letter headers and footers and other personal information into invoices letters and other documents.

      In order to be able to modify the information without bringing the database out of the server, the global fields are populated by a script when the database is opened.

      I am trying to make this database work for different users adapting the privileges so they can only see the records they have created.

      I can modify the opening script so the details of that user are inserted into the global fields on opening the file.

      My question is what will happen when two users with two different settings are working on the file at the same time. If there is a conflict how can I avoid this.

      Thank you

        • 1. Re: Different settings for different users simultaneously
          keywords

          Global fields on a hosted file are specific to each user, so there is no problem with having more than one setting happening simultaneously. Each user will see only their own global settings. Once the globals are exposed to the user to modify as required, all is well.

          If your point is to prepopulate the fields with different settings, then you will need to store the different settings somewhere and then populate according to how your script navigates. You would have to store each set of settings in separate records, and then work out a method of each user selecting the correct record to use. Shouldn't be hard—you could base the selection on the user account, and store the user account in the same table as the settings. Something like that.

          • 2. Re: Different settings for different users simultaneously
            guessmaster

            Thank you.

            Once the G fields are populated by User 1 if User 2 opens the database and the script populates the same G fields. Will the two users see different settings on the same field?

            • 3. Re: Different settings for different users simultaneously
              beverly

              On a HOSTED database, the global fields are User-Session based.

              You are correct, what User "A" sets will be unique while "A" is in the file where the global field resides. If at the same time, User "B" enters data, it will be different and "A" will not see what "B" entered.

               

              If there is no value set in the field (before being hosted), then the field will be blank the next time "A" or "B" opens the database. If there is a value in the global field (before being hosted), then both users will see that value, but can independently change it. When either session is over, the global reverts to "empty" or "filled" (before hosting) for that user.

               

              beverly