5 Replies Latest reply on May 8, 2014 8:11 AM by philmodjunk

    Need Script Help

    JamesKnecht

      Title

      Need Script Help

      Post

           My customer table is now working great & now trying to integrate that with PO entry.  I have a button on the customer file & have it setup to run a script.  The script says:

           Open File["JOB FILE"]

           New Record/Request

           This opens the PO entry table but does not open as a new record.  What have I done wrong?

           Also will need to pass some info from the customer file to the job file.  How best to do that?   I played with opening a window with related record, but that doesn't work with a new customer.

        • 1. Re: Need Script Help
          philmodjunk

               Your Script is opening another file and then creating a new record in your current file's current layout, not a layout in the newly opened file.

               Your design will be simpler to manage and modify if you keep all your tables in the same file.

               If you chose to keep your current set up with two separate files, I recommend that you open manage |database | relationships in one of these files and use the button in the bottom far left corner to add table occurrences with remote data source references to each of the tables in the other file. You can then put all your layouts in this file and can directly work with data in the tables in both files.

          • 2. Re: Need Script Help
            JamesKnecht
                 

                      Your design will be simpler to manage and modify if you keep all your tables in the same file.

                 Explain please.  What file?  I am bringing over my dBase files & having Filemaker convert them.  I then work in those tables.  How do you put all these tables in one file?

            • 3. Re: Need Script Help
              philmodjunk
                   

                        What file?

                   Open File["JOB FILE"]

                   Opens up a file for which you have an External Data Source reference in Manage | External Datasources named "JOB FILE".

                   Import Records | File with the New Table option selected for the new table can copy the table and the data it contains from another file into your current file.

              • 4. Re: Need Script Help
                JamesKnecht

                     Well, I need to try & digest this.  I'll play with importing the table.

                     So when you import a table, what happens when you modify the original table?  Are both updated?  Are they actually one in the same?

                     In a business application, like mine, what should be the starting file?  Right now I will import the Job file into the customer file, but instead of that, should I start with some home page & import both (plus others) into it?

                • 5. Re: Need Script Help
                  philmodjunk

                       If you use import records with the New table option specified for the target table, you are making a completely separate copy of this table. Changes later made to the original table will not show in this new copy. Use this method if you plan on discarding the original file once all tables defined in it are imported into your combined file

                       If, on the other hand, you use the bottom left control in Manage | Database | Relationships to add a new Tutorial: What are Table Occurrences? that is set up to refer to a table in the other file, then changes made to the table in the original file will also appear in the file where you added this table occurrence as this just adds a reference to the original table in the external data source.