Why not set up a Shipments table linked to Order? 1 or more shipments would fulfil a given order.
A Shipments layout would list your line items twice in two portals: 1 portal reproduces the lineItems on the order to which the shipment is linked. Clicking items in this portal adds it to your ShipmentLineItems table where you can adjust the quantities to a value less than the total ordered.
Managing the details so that you cannot ship more of a quantity than was ordered and make sure that no line item is omitted from the order, but it's all doable in FileMaker.
This keeps your order unchanged for purposes of communication with the customer but produces individual shipping tags that itemize the actual items included in the shipment. You then have the option to bill from either the original order or the individual shipments depending on your business practices.
hi philmodjunk ... i like your idea ...
i'm not sure how to setup a second portal with the individual orders. how would i do this to make sure i don't screw up an existing entry?
The second portal won't be to the same table or at least one point to the same records via the same relationship.
Shipments::__pk_ShippingID = ShippedLIneItems::_fk_ShippingID
Shipments::_fk_OrderID = OrderLineItems::_fk_OrderID
The portal to ShippedLineItems lists the items shipped on the current shipping tag. The portal to OrderLineItems lists all items listed on the original order. Portal Filtering or conditional formatting can help the user distinguish between ordered items not yet shipped and items still not fully shipped (assigned to a shipping tag.) And if a Qty of 15 for a given item is ordered, you have the option to put the same item on two shipping tags--one for a Qty of 10 and the other for a Qty of 15--to given an example of splitting the order over two shipments.
i've tried several times and failed (thank god on my backup) ... and i have to admit i am overwhelmed with your comment. can you please give me an step-by-step-guidance to my task. so far here's what i have set up ..
Take a look at the relationship between Shipments and ShippedLineItems.
Shipments::ShippingID = ShippedLineItems::ShippingID
Shipments::OrderID = ShippedLineItems::OrderID
For the second portal to Ordered LineItems, you can add a portal to OrderLineItems on your portal, or make a new occurrence of OderLineItems and link it directly to to Shipments by OrderID and place a portal to that new occurrence on your layout.
Okay ... i have linked Shipments to OrderID now .. and i try again to set the portal up
This is not what I suggested. Here's how to create a new Occurrence of OrderLineItems:
In Manage | Database | relationships, make a new table occurrence of OrderLineItems by clicking it and then clicking the duplicate button (2 green plus signs). You can double click the new occurrence box to get a dialog to appear where you can rename the new occurrence box.
We have not duplicated a table. Instead, this is a new reference to the same table already present in your database.
And I suspect that the original link form Order to Shipments will also be needed.
I hope I have the relationships according to your suggestions …
The Portal still is a bit of a mistery ... what am I doing next?
Are you able to put a portal to Shipped LineItems on your Shipments Layout?
Are you able to put a portal to OrderLineItems 2 on this same layout?
At the start, the first portal is empty and the second lists all items from your order.
Can you get to that point in this process?
so far so good (i guess) but the second portal (OrderLineItems2) doesn't show any records (yet)
Then the next step is to make sure that you have created a new record in Shipments that has the correct value in Shipments::OrderID.
You can create a script and use a button on your orders layout that either finds any existing shipments records or (if none exist) that creates the first new shipments records at the click of a button. A "new shipment for this order" button can also be placed on the shipments layout as well. You can also just select New Records while on the Shipments layout and use a drop down list on the OrderID field to select the order for that shipment.
Note that the current design limits you to one order for any given shipment. (You can have several shipments to fulfill one order, but you can't combine orders for a single shipment.)
Here's a script example for that first button that you can put on the orders layout:
First, doubleclick the line between Order and Shipments and select the "Allow creation of records via this relationship" option for the Shipments table.
#This script should only be run from a layout based on the Order table occurrence
Set Field [Shipments::OrderID ; Order::OrderID]
Go To Related Record [Show only related records; From table: Shipments; Using layout: "Shipments" (Shipments)]
How this works:
If at least one Shipments record exists for this order, Shipments::OrderID will already contain the value that is being set to it by the set field step and thus there will be no net change to the data. If no such related record exists, the set field step will both create a new shipments record and assign it the matching OrderID value needed to link it to Order and OrderLineItems 2--due to that "Allow creation..." option you specified for Shipments in the relationship between these two table occurrences.Then the Go To related records changes to the Shipments layout and brings up a found set of all records with this orderID.
One order per shipment is perfect ...
For starters i have chosen the New Records way on my Shipments layout, (with DropDown on OrderID) but somehow the Shipments Layout (with the two portals) does not show any records.
Note the :: preceding the field name for OrderID. This indicates that you are using a field from a different table occurrence than the layout's table occurrence, shipments. Open Specify field by double clicking this field while in layout mode. Then select the "current table" option from the drop down at the top of this dialog. Then select OrderID again, but now from the shipments table.