AnsweredAssumed Answered

Update quantity of stock—'booking in' layout

Question asked by philmcgeehan on Oct 3, 2013
Latest reply on Oct 3, 2013 by philmcgeehan


Update quantity of stock—'booking in' layout


     Hopefully I can call on the collective expertise of you guys again!

     I have a list of Stock Items with quantities for stock levels at 3 different locations that I want to be able to update using a new "Booking In" layout.

     I've got the layout pretty much set, as you can see in the image above.

     First, I set the location where I want the stock to be booked into in the first pop-up menu.
     The second pop-up menu changes the list of products in the top portal, so that it only shows products from the selected supplier.

     Then I want to be able to click the add button copy the info for that portal record to the bottom portal, which I want to act like a "Basket" (as in online shopping).

     The code I have so far,

     Sets variables from the info on the layout and the selected portal row.
     Opens the a BookIn table
     Creates a new record
     Sets the fields from the Variables
     Commits record
     Closes the table

     Finally, I want to click the Add to Stock button, to commit the stock levels to the quantities for the selected location.

     The thing I'm having trouble with is the relationships between the tables. If anyone has a template I could look at would be good.

     The records get saved to the BookIn table correctly, but I don't know how to get them to appear in the bottom portal.

Tables; I'm sure there'll be a better way of doing this but this is what I have at the moment.
     I've been looking at this for a long time and I'm going round in circles!frown