2 Replies Latest reply on Aug 11, 2010 1:38 PM by med

    reading values from unrelated file

    med

      Summary

      reading values from unrelated file

      Product

      FileMaker Pro

      Version

      11 pro advanced

      Operating system version

      windows vista

      Description of the issue

      I am new to filemaker, but I have been programming for many years. I do not know how can I read some parameters from a different unrelated file to use for calculations in scripts while the layout I am working with allows me only to talk to the source files and related ones.
      I have about 40 tables in th system I am trying to rewrite and it is unreasonable to duplicate fields in all tables and also the paramters files cannot be linked in a relation to others.
      Any hints?

        • 1. Re: reading values from unrelated file
          philmodjunk

          Report an Issue is the forum section for reporting problems (possible Bugs) with the software. Feel free to keep posting here for help with this question, but next time, you may get a more timely response if you post to the Filemaker Pro forum. (There's a tab for it at the top of your screen.)

          More detail in your problem description might produce a more detailed response...

          You can use a script parameter to send a value (or list of values) from one file to another so that a script called in the other file with the Perform Script step can use these values to work with the data in the unrelated file. You can also define global fields for such data in a table in one file and then add a table occurrence to your relationship graph that links via an external data source reference to the other file. Then both files can "see" and interact with the data in the same set of global fields.

          Say you want to use a Name and a date in file 1 to find records in file 2:

          A script in file 1 can be:
          Perform Script ["File 2 script name" ; from file: "File 2"; parameter: List (File1table::Name ; File1Table::date )]

          The file 2 script can be:

          Enter Find mode[]
          Set field [File2table::name ; GetValue ( Get(ScriptParameter) ; 1 ) ]
          Set Field [File2table::date ; GetValue ( Get(ScriptParameter) ; 2 ) ]
          Perform Find[]

          • 2. Re: reading values from unrelated file
            med

            Thank you