2 Replies Latest reply on Nov 14, 2012 6:43 PM by DavidJondreau

    Button to add a 2nd instance of a field


      I'm trying to minic the part of the FileMarker Starter solution Research Notes. on the section of the Research Detail page there is a Notes section that has a date field, Subject Field and a Notes field When you click on the Add button it create a new set of fields underneath. The button has a script "Add Notes + attached to it.

      Go to Field (Notes::Date)

      Go to Portal Row l[Last]


      Since the database I'm making it os a one to one relationship. I'm looking for the script taht will do it. The script that is used is for a portal. I tried to crate a one to many reletionship, bit it still does not work. Is there other scripts that need to be in place (for the portal)? Is there a script that will add additional set of fields to a one to one relationships?

        • 1. Re: Button to add a 2nd instance of a field

          To add records using a Portal,  go into the relationship graph and edit the relationship for the Table Occurence for the Portal.  Click the check box for "Allow Creation of records in this table via this relationship"  Close the manage Database window and then on the layout for the portal clicking into the last row in the portal will create a new record in the table.  That is what the script you does. 


          Another option is to have a script that changes layouts,  then executes a new record script step and fills in fields.




          • 2. Re: Button to add a 2nd instance of a field

            No. The relationship should be one-to-many. But in Filemaker there is no difference in how you would configure a one-to-one and a one-to-many, so that doesn't really matter.


            To make this work you need a "parent" table, like Research Detail, and a "child" table, Notes. Make a relationship between the two. The Research Detail table should have a unique ID field, and Notes table should have a Research Detail ID field and you make your relationship between those two fields. Check "Allow creation of records in this table..." checked for the Notes side of the relationship.