1 Reply Latest reply on Dec 29, 2014 2:40 PM by StephenWonfor

    Table to table copying or another technique?

    woodeye

      Hi, I am fairly new to filemaker and I am wondering how to go about solving an issue: I need to inventory samples and produce a report that shows which samples were pulled (discontinued), which samples were missing and finally a listing of samples that were present. There are upwards of 1,000 samples.

       

      Would it be better to copy the records from the lookup table (contains a list of all the samples and whether they have been discontinued or not) to the Sample table and then simply mark a field for each sample whether it was pulled, missing or present?

       

      Another option I think would be to add a "status" field to the lookup table. This field would be set to null for each record in the table prior to taking inventory. I would then need to create a report showing the results. The downside of this technique would be that I would only have a report to show the results, not a record.

       

      Any suggestions or advice would be aprreciated.

       

      Thanks,

       

      john

        • 1. Re: Table to table copying or another technique?
          StephenWonfor

          John

           

          I think this all depend on whether the inventory table needs to be permanent or would vary at different points in time.

          You could make a reporting table and then use a script to populate that table with data based upon the reporting date.  You could then use the reporting table as a dynamic historical record of a sample's history.

           

          Sample Table to Reporting table using id_sample and a global field ReportDate and allow creation of new records.

           

          Set the Report Date to the date for the report then run a looping script like this to create the report records.

           

          GoToFirstRecord

          Loop

               SetField(sample_REPORT|reportdate|::Status) to "Null"

               GoToNextRecord(ExitAfterLast)

          EndLoop

           

          If you place the related Status Field on your layout you could now tag all items as to "Discontinued", "Missing" or "Present".

          Next time you need to update status you rerun the script with the run date for that date and you'll get new status fields to report on.

           

          Stephen

           

          “Poets have been mysteriously silent on the subject of cheese.” ― G.K. Chesterton, Alarms and Discursions