8 Replies Latest reply on Dec 3, 2012 8:16 AM by dnovo

    problem with concurrent users

    dnovo

      Hi there, I'm new to the developer community and I've an annoying issue with FM Server 11.

      We've several DB's running on our FM server and everything works as it should be except for 1 DB.

      It's an planning system for around 30 people and is based on a weekly system. 2 people make up the planning and around 10 look at it using, iPads, Macs and Windows machines.

      The problem is that when 1 user switches to week 48 all the other users are forced to view 48, no mather the week they we're looking at.

      If I'm correct, FM server opens an "instance" of the DB for every user, so they should all be able to view there own dataset right?

      We've don't have this issue with any of the other DB's running on the same server.

      Any suggestions?

        • 1. Re: problem with concurrent users
          ch0c0halic

          The field that selects the "week" should be defined to use Global storage, which makes it unique to every user. It should not be stored.

          • 2. Re: problem with concurrent users
            PalmDBS

            No, if they are opening a remote database on the server, they are all working on the live database.  It sounds like there is a field storing the user's current layout, and that field needs to be made into a global field so that the value stays unique to the user (with some small caveats).  Check against your other databases to ensure how the field is set up.

            • 3. Re: problem with concurrent users
              fmpros

              Concur, the key field that involved in the week relationship needs to be global.

               

              William

              • 4. Re: problem with concurrent users
                dnovo

                Thanks for the responses, unfortunatly the problem remains.

                Because the week planning depends on the actual list of employees I created a temporary table called "weekplanning". When I ask to show me week 48 that table is erased and a new record for every active employee is added. The actual data comes from another table that stores all the actual items (date, who, what...). So the table "weekplanning" shows only the relevant data for the week I asked for. It sounds maybe complex but this way I can show a week from the past with the employees that were active at that time and I can show a future week with the employees that are currently active.

                Since the table  that shows the week planning is a dataset build when a user asks for it I assumed that that dataset would be unique for every user, apperantly I'm wrong, every connected users screen updates when someone clicks on a certain week.

                 

                This is what happens:

                Max nr of employees: 35

                Max working day's: 5

                 

                Loop thru employees

                     Loop thru actual data

                          create record in temporary table (employee + data)

                     end loop

                End loop

                Show the result

                • 5. Re: problem with concurrent users
                  RubenVanDenBoogaard

                  Yes,  every user can 'see' all the records.

                  When you make a relation to the table using a global field you can have the data for week 48 for user 1 and week 40 for user 2, when the weekdata is present in de table.

                   

                  What you could do is use the table 'weekplanning' to keep the data for the past weeks.

                  if someone wants the data for a certain week, say 38-2012 and it is not yet present in the table, use a looping script to generate it.

                  when a user wants the current week, or following weeks, always generate it.

                   

                  Hope that helps,

                   

                  Best regards,

                   

                  Ruben van den Boogaard

                  Infomatics Software

                  ruben@infomatics.nl

                  • 6. Re: problem with concurrent users
                    dnovo

                    Hi All,

                     

                    I've looked at all the responses, thanks, and tried to solve it but no luck.

                    I made the field "week" global but the result now is that when I create the tempory table FM keeps adding records, strange because I start with deleting all the records from this temporary table and than I add a new record for every employee.

                     

                    Can anybody give me a simple example of how this should be done?

                    - employees (between 1 and 35)

                    - I need to show a week calender for those employees

                    - every line shows an employee and his 5 workday's

                     

                    Have a nice evening,

                    Peter

                    • 7. Re: problem with concurrent users
                      TimDietrich

                      Peter --

                       

                      I think you were on the right track. However, you need a way to determine the records in that temp table that apply to the current user.

                       

                      For example...

                       

                      Max nr of employees: 35

                      Max working day's: 5

                       

                       

                      // Clear any of this user's records from a previous session.

                      Find any existing records in the temporary table where creator_account = Get ( AccountName )

                      If Get ( FoundCount ) > 0, Delete All Records

                       

                      Loop thru employees

                           Loop thru actual data

                                create record in temporary table (employee + data)

                                set creator_account = Get ( AccountName )

                           end loop

                      End loop

                       

                       

                      // Show the result.

                      Find the records in the temporary table where creator_account = Get ( AccountName )

                       

                       

                      Note that you'd need to add a "creator_account" field to the temporary table.

                       

                      Hope this helps!

                       

                      -- Tim

                      • 8. Re: problem with concurrent users
                        dnovo

                        Hi all,

                         

                        Thanks for your help, I've solved the problem/ Tim's suggestion put me in the right direction.

                        I hope that I can help some people in the future.

                         

                        Peter