2 Replies Latest reply on Mar 20, 2013 1:11 PM by cjferrera

    AUTO ENTER A FIELD VALUE BASED UPON THE ENTRY OF SPECIFIC FIELD IN A LAYOUT

    cjferrera

      Title

      AUTO ENTER A FIELD VALUE BASED UPON THE ENTRY OF SPECIFIC FIELD IN A LAYOUT

      Post

           Hi, I am new to FileMaker and the Forum.

           I wonder if anyone might be able to help me with a Script Trigger & Script.

      OBJECTIVE:  Automatically enter the Unit Price for a selected Part Number.

      TABLES::  Two; Estimate Data & Part Catalog

      LAYOUT:  One; Estimate Data

      VERSION: FileMaker Pro 12 Advanced

           The Part Number is entered into the Part Number field in Estimate Data Layout and I am trying to  pull Unit Price from the Parts Catalog Table.  

           I believe the Script Trigger to use is OnObjectSave and I have pulled this Script Trigger together with Script steps, however, I can't seem to get it to work.

           Can anyone help?

           Thank you,

           Chuck Ferrera 

        • 1. Re: AUTO ENTER A FIELD VALUE BASED UPON THE ENTRY OF SPECIFIC FIELD IN A LAYOUT
          philmodjunk

               You don't need any scripts nor any script trigger. You do need this relationship:

               Estimate Data>------Part catalog

               Estimate Data::_fkPartID = Part Catalog::__pkPartID

               For an explanation of the notation that I am using, see the first post of: Common Forum Relationship and Field Notations Explained

               With that relationship in place, when you senter or select a part ID in _fkPartID, a Unit price field in Estimate Data can be set up to auto-enter the unit price from the corresponding record in part catalog.

               Find the Unit Price field defined in the Estimate Data table in Manage | database | Fields. Double click it to open Field Options. Use the Looked Up value option on the Auto-Enter tab to copy over the unit price from the unit price field in Part catalog.

               If you are using Filemaker 12 or Filemaker 11, the Invoicing starter solution uses this type of relationship and auto-enter setting to copy over unit prices to a table of line items (or Invoice Data in Filemaker 12) when a product ID is selected.

          • 2. Re: AUTO ENTER A FIELD VALUE BASED UPON THE ENTRY OF SPECIFIC FIELD IN A LAYOUT
            cjferrera

                 Hi PhilModJunk,

                 Thank you for your timely response to my Posting.

                 I'll give this a try and see how it goes.

                 Best regards,

                 Chuck.