1 Reply Latest reply on Jul 10, 2013 12:16 PM by philmodjunk

    how would i select 1 record from one table (or database) , show it in a layout on a different table...

    scotthoffman

      Title

      how would i select 1 record from one table (or database) , show it in a layout on a different table or db

      Post

           my set up is:

           1 job ticket db

           1 stock db

           i want to select 1 record from "stock" and enter it in a layout on the job ticket db with upto 6 different stocks being shown in real time in that layout.

           i already have both db's running with records in each.

           the highlighted part in the image is where i need to post the records from "stock"

      jt.PNG

        • 1. Re: how would i select 1 record from one table (or database) , show it in a layout on a different table...
          philmodjunk

               This is essentially the same set up as a typical invoicing system. The table on which this layout is based in your "invoice" and the portal at the bottom would be to your "line items" or "invoice data" table and this would not be a portal to the Stock table but rather is a table linking the line item table to your stock table.

               Your relationships would be:

               Layout'sTable-----<SelectedStocks>-------Stocks

               LayoutTable::__pkID = SelectedStocks::_fkLayoutID
               Stocks::__pkStockID = SelectedStocks::_fkStockID

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

               You can then select stocks by setting up the _fkStockID field as a drop down list or pop up men of stock ID's and their names. You can also design other methods for selecting stocks, but I'd use this method at first to confirm that you have everything else set up correctly. Fields in this portal can be fields from the selectedStocks table that use a looked up value setting to copy data from Stocks or they can be fields from the STocks table so that when you select a value in the _fkStockID field, they display data about that stock.

               I have deliberately avoided calling the first table in my example the Job Ticket table as you have a second section in your layout that appears to list multiple job tickets and thus it is not clear to me whether you might need yet another related table for the rows of data shown there that you can also implement with a portal.