3 Replies Latest reply on Aug 2, 2013 9:09 AM by philmodjunk

    How to do a Calculated result

    scotthoffman

      Title

      How to do a Calculated result

      Post

           I have a table called "stock" and a table called "Production". When im in my stock layout i have a button set up to select the id of said stock, copy, and take it to the production layout where it pastes into a id field there. The "stock" table  has some other fields i want to auto import.  I have  fields setup in the production layout called item, color, and size, how would i set those fields to auto calculate the corresponding record from "stock" based on the id number copied over?

        • 1. Re: How to do a Calculated result
          philmodjunk

               Instead of copy and paste script steps. Use set variable, set field to move data like this. That way, any data copied to the clipboard by the user is not mysteriously replaced by the data copied by your script.

               I think you need more tables than just stock and production. A bill of materials table that lists each stock item selected for a given production record would greatly simplify the issues you are having.

               Start with these relationships:

               Production-----<BOM>-----Stock

               Production::__pkProductionID = BOM::_fkProductionID
               Stock::__pkStockID = BOM::_fkStockID

               You can place a portal to BOM on the Production layout to list and select a Stock record for each given Production record. Fields from Stock can be included in the Portal to show additional info about each selected Stock record and the _fkStockID field can be set up with a value list for selecting Stock records by their ID field.

               Then, to get the additional data that you wanted to "auto import", you can either include fields from Stock in the BOM portal row or you can define fields in BOM that use auto-enter functions (Looked up value) to copy the data from specified fields in Stock.

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

          • 2. Re: How to do a Calculated result
            scotthoffman

                 I tried the portal method but i need at least two different portals in a layout. 1 for Stock and 1 for Estimating and probably one for customers all going into the production layout.

                 Heres what i have:

                 Customers-----<Estimates>--------<Production>--------------<Stock>

                 i also have estimate data and stock data in between.

                 i want to take the stock for a "job" and add it to the production layout (upto 6 different stocks per job) with current units on hand, then my pressmen can deduct the total amount ran from say stock line 1 on production layout and it enters in the stock layout.

                 Then at the same time have "portals or other items from estimating data included in the production layout

            • 3. Re: How to do a Calculated result
              philmodjunk
                   

                        i want to take the stock for a "job" and add it to the production layout (upto 6 different stocks per job) with current units on hand, then my pressmen can deduct the total amount ran from say stock line 1 on production layout and it enters in the stock layout.

                   And this should be implemented with a Bill of Materials (BOM) table.