2 Replies Latest reply on Mar 14, 2014 8:45 AM by fireballprinting

    Records Getting Mixed Up

    fireballprinting

      Title

      Records Getting Mixed Up

      Post

           Hello,

           I'm running filemaker pro with multiple users, hosted through filemaker server. I've recently started experiencing a problem where if two people are working on different records at the same time, the data from one record will get mixed up with the data from the other. It's hard to give an example, because it's been happening in all different situations, but here's one time where it's been happening:

           We have a script to create a quote for a client, and it brings them from the clients layout/table to the quotes layout/table. This is the script:

            
           Set Variable [ $CLIENT; Value:clients::_kp_clients_id ]
           Go to Layout [ “Quotes Form” (quotes) ]
           New Record/Request
           If [ Get ( LastError ) = 200 ]
           Show Custom Dialog [ Title: "Can't Add"; Message: "You don't have privileges to add " & Lower(LeftWords(Get(LayoutName); 1))
           & "."; Default Button: “OK”, Commit: “Yes” ]
           End If
           Set Field [ quotes::_kf_clients_id; $CLIENT ]
           Set Field [ quotes::select; 1 ]
           Go to Field [ quotes::job_name ]
           [ Select/perform ]
            
           Sometimes when users activate this script, the client id that's put in for the new quote is the id of a client that another user is editing.
            
           I've had similar problems with other scripts. These are scrips that I've been using for months without issue so I'm not sure what's causing the problem now.
            
           I did recently upgrade all the users to FM Pro 13, but I'm still running Server 12, not sure if that would cause it. I also recently preformed the update to Server 12 and upgraded our OS to Mavericks.
            
           Thanks!

        • 1. Re: Records Getting Mixed Up
          philmodjunk

               I see no reason why what you describe should happen from running this script, provided that you are on a layout based on Clients when you perform this script. Each user has their own found sets that are independent from one another so what one user does should not affect another when it comes to what records make up the found set, sort order and current record on their screen.

               But if this script is being run from a layout that is not based on Clients, there could be issues with the layout and current record that are causing the results that you are getting. It's possible that the wrong value is then being put into the variable.

               As I was about to post this, I just thought of another reason this may be happening. Go to a layout based on Clients where you have access to the clients_kp_clients_id field. Enter find mode. Put a lone ! in this field and perform the find. You should not find any records. If you do, you have a serious problem where you have client records with ID's that are not unique. One way that this could happen is if the id field is an auto-entered serial number and you imported client data from another table or file without also updating the "next serial value" setting on this field to be larger than the largest imported value.

          • 2. Re: Records Getting Mixed Up
            fireballprinting

                 Thanks Phil,

                 I just performed the ! test as you suggested and didn't find any records.

                 I had also run through this script with the debugger and on the times that I tried it, it was using the correct id in the $CLIENT variable, and it was starting out from a layout based on the clients table.

                 Not sure what else it could be.