From Dwayne Wright PMP
Certified FileMaker Developer
Please Note: If you are viewing this page in a news feeder, the images may get munged up a bit or other formatting of the posting may fail. For the best experience, please visit the journal directly by clicking (here).
FileMaker provides a method for users to create new portal rows on the fly. That is to say, using a portal on one layout, you can create new matching related records without leaving that layout or running a script.
First the relationship options for the portal need to be set to allow the creation of related records. This option can be found in the Define Relationship Dialog box under each listed table occurrence (because relationships are bi-directional).
So back to the user experience, when the user is in Browse mode, the last portal row will be empty. As soon as the user adds data to that portal row, a new child record is created and the child key field is automatically populated with the parent key data. This insures the portal relationship is valid. When the user exits the record, another blank portal row will appear on the last row ... ready to repeat the new portal row ( aka new child record ) process.
Here you can see the portal for the relationship from my blog entries to the crossword puzzle questions. You can see that I have already entered in one crossword question and have a blank row in which to create another linked crossword question (via a blank row ready for data).
As with many things FileMaker, this is very quick and easy to setup. As long as the users are familiar with how this works ... everything should be in good shape. However this method can have a few drawbacks and some sets of conditions that don’t allow this to work (although it looks like it should).
CONSIDERATION: The ability to create related records on the fly will require the use of a equi-join relationship. In other words, it has to have the equal sign predicate used in the relationship. Also, the child key field (which is auto entered to create the relationship) has to be able to accept new data. A calculation field or a field without security access will break the auto create related records feature to fail.
DRAWBACK: If you have a large amount of records and are doing a lot of portal data entry, you constantly have to scroll to the bottom of the portal list every time you want to add new data.
DRAWBACK: Finally, an empty bottom portal row doesn’t necessarily scream “ enter data here “ for inexperienced FileMaker users. Most will think they are editing an existing but empty portal row.
So it is not uncommon for some developers to create alternative interfaces for the creation of related records. This can include scripts that take the user to the open portal row ... or ... have the user enter data into globals and then transfer that information to the open portal row fields.
More info about the author and FileMaker in general, contact me at firstname.lastname@example.org.
© 2007 - Dwayne Wright - dwaynewright.com
The material on this document is offered AS IS. There is NO REPRESENTATION OR WARRANTY, expressed or implied, nor does any other contributor to this document. WARRANTIES OF MERCHANT ABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY DISCLAIMED. Consequential and incidental damages are expressly excluded. FileMaker Pro is the registered trademark of FileMaker Inc.