Portals & Lookup
I am new here and fairly new to FileMaker - I have FileMaker Pro 11. I am trying to develop a database for our business and have a couple of problems which seem to both be issues with Portals - one I've managed to get around (although would rather do it better) and one I am struggling with.
In the part I am struggling with there are four tables involved:
Customers (includes all their contact details etc.)
Vehicles (includes details on the vehicles a customer owns - one Customer to many Vehicles relationship)
VehicleOrder (includes details on an order for a vehicle - one Vehicle to many Vehicleorders relationship)
DeliveryDetails (includes delivery type and contact information for delivery - one VehicleOrder to many DeliveryDetails relationship)
I have a Customer layout with a tab to the Vehicles which I put in a portal.
The first issue I had was to be able to take the VehicleID from a line on the Vehicle portal into the VehicleOrder layout - I click an arrow at the end of the portal line and it takes me to the VehicleOrder layout and places the Vehicle::VehicleID from the line I clicked on in the VehicleOrder::VehicleID field. I tried using SetField in a script, this did not work for some reason and I ended up using a copy and paste in the script, which works fine but I am aware is not the best way to do this.
The issue I am really stuck on now is with a portal on the VehicleOrder layout allowing me to enter data into the DeliveryDetails table. What I want to happen is to be able to select the delivery type (invoice / delivery / collection - hence I could end up with up to three records in DeliveryDetails for each VehicleOrder record) and then the contact details to be automatically populated with the customers current contact information, which I can then amend or leave as it is (I need to copy the information over so it remains static for that VehicleOrder even if the Customer changes their address in the future).
On the DeliveryDetails table I have used a Lookup for each of the contact information I want automatically populated, and set it to the equivalent information in the Customer file. If I go into the DeliveryDetails layout and input a VehicleOrderID this works fine, however in the portal on the VehicleOrder layout it does not come up with anything. Is there something silly I am missing?
Any help would be very much appreciated.
All the best,