3 Replies Latest reply on Feb 7, 2014 2:20 PM by philmodjunk

    Link data between two files

    AlejandroAlanis

      Title

      Link data between two files

      Post

           Ok, I bought an appointments program, it has an employee table, In my program I have an employee table too. The thing I want to do because I think is the easiest way to make the appointment program work. Is to link my table with the appointment table so it can record automatically all the records in the employee appointment program table.

           I made the relationship with the employeeID of both tables, now I need the script but I tried and it doesn't work.

           Thanks everyone 

        • 1. Re: Link data between two files
          philmodjunk

               And what are you trying to do with this script? Do you even need a script?

          • 2. Re: Link data between two files
            AlejandroAlanis

                 Hi Phil,

                 The programs are in different files, mine is called RCE.fmp12, and the Appointment Program is in Appt.fmp12

                 In both programs there is a client table with ClientID, First Name and Last Name.

                 I tried to make a script importing records (updating the matching records) but it take too long every time I click on Client Button.

                 I'm thinking in two ways:

                 1) Assuming that I already import all record from RCE to Appt Client table, when pushing client button: search all clientID from "Appt Client table" (because it's going to be the way to registering new clients) and compare them with the ClientID from "RCE Client table" and then copy the records (3 fields) that doesn't exist on RCE.

                 2) From Appt program I can call the RCE Client Table and make a copy of the layout that I used to register a new client on RCE program and then add a button in that layout that copy in a variable the ClientID, and then go to "Appt Client Layout" and search for his ID, if it exist then it will open his record, if not, then it will save as a new record and after that, stay in that record.

                 I hope you understand me. If you have a different approach or idea that will be faster solution, I will appreciate that.

                 Thanks

            • 3. Re: Link data between two files
              philmodjunk

                   If you have exactly the same fields in your client table in both files:

                   Open manage | Database | relationships in one of these two fields. Find the Client table and double click it. Use Add FileMaker Data source in the drop down to select the Client Table from the other file.

                   Now both files use the same table for client data--no importing or scripting needed. You, in fact, have a table that can now be deleted from the file where you made this change as it will no longer be used.