November 26, 200520 yr Newbies I have an orders database that I am attempting to set up. There are three related tables that seem relevant to the problem. Inventory --- Contains data about all items which can be ordered. Orders --- Contains data about each specific order. each order can contain multiple items. OrdersLineStorage --- Acts as a join table between Orders and Inventory. I'm trying to do the following things... 1) Enter basic information about an order. 2) Select an item or items to add to the order using a portal which shows only items from inventory with the same brand as specified in the basic order data. 3) Add the selected item(s) to the LineStorage table by clicking a button and having a script which would auto populate the fields including Qty, ItemID and OrderID. When I do this, it creates a new record in LineStorage, but does not transfer all the appropriate fields. Any ideas on what I am missing? Thank you in advance, Korbin diagram.pdf orders2.zip
December 27, 200520 yr One problem is that ORDLS_fk_OrderID is not getting set, thus no related records show up for you. Options include (a) setting your ORDLS fields from the Orders layout, which allows creation of related records, or (: setting that field as part of your script. If you choose (:, recognize that changing layouts in a script also causes FileMaker to change found sets -- it will not 'remember' the INV_pk_LineID you chose when you were on the Orders layout. So to set a field with that value after changing layouts you either need to pass it as a script parameter, or store it in a global. I strongly recommend investing time finding example order/inventory files on this site and others, and examining their internal workings, so as to gain more familiarity with FileMaker.
Create an account or sign in to comment