Link the customer table to your Orders table by a customer ID field.
Customers::__pkCustomerID = Orders::_fkCustomerID
With that relationship defined, you can either put fields from Customers on your orders layout to show info on your customer or you can set up fields in Orders that use an auto-enter field option to look up (copy) the data from the selected customer record.
Format _fkCustomerID as a drop down list or popup menu of customers with customer ID specified for field 1 and a customer name field specified for field two in a "use values from field" value list. (You may need to set up a calculation field to combine first and last names to use with this list.
If customer does not appear in list, click a button that runs a script that creates the new customer record and uses a variable to copy over the ID of the new record into your _fkCustomerID field.
Once you can get the "beginner level" approach working. You can take a look at using a script supported method where you can type in part of the customer's name and see the list "filter down" to just those customers. If you enter a name that does not exist in the list, the script can detect this and offer to create a new customer record for you.
This technique is demonstrated in "Adventures In FileMaking #2" a new free to download file that I am hoping to release within the next 24 hours if I can finish a final editing pass through all its many layouts. A download link will be posted to my FaceBook page when I finally get it released.
Thanks for your reply!
Will give it a try and get back to you with the outputs.
PS: And I just followed you on FB for your upcoming video release
It's not a video release, it's a FileMaker file that you can download. You get actual working examples of the concepts so that you can read about, see it work and then open up the design tools in FileMaker and check exactly how I set up each example included in the file--all with very complete information on what I did and how it works.
Great then! Thanks
I would like to thank you for your excellent tutorial! Great help.
One small and weird problem is happening and I c'ant figure how is that possible...
I add a new CashRegister table that will gather all the operations created via the Operations table via a simple relashionship
__pkOperationID linked to _fkOperationID in the CashRegister table.
what's happening is that whenever I create a new operation in the Operation table FM doesn't create a record automatically in the CashRegister table via the relationship!
attached below is an image of my relationship database with the edit section.
any advise will be much appreciated.
"Allow creation..." makes it possible to use the relationship to create related records. It does not set up the Filemaker to do it automatically if the only thing you did was create a new record in the other table. The typical use of this relationship option would be if you had a portal to CashRegister on your Operations layout. If you had that, you'd see an extra blank "add row" below the last portal record shown in the portal. This relationship option then makes it possible for the user to add a new CashRegister record by entering data into a field in this "add row" and then FileMaker will automatically copy the value of __pkOperationsID into the _fkOperationsID field of the newly created CashRegister record to link it to the current parent record on your Operations layout.
But simply creating a new record in Operations will have no affect on what records exist in CashRegister. And there is rarely a need for such to happen automatically as it is very easy to add related records to CashRegister on an "as needed" basis.