2 Replies Latest reply on Jul 17, 2013 11:20 AM by DranLang

    Adding a new Portal Record



      Adding a new Portal Record


           Hi everyone, I've got a situation where I want to create a new job (identified using Job ID) by clicking on a button and upon clicking the button the Job ID will increment by 1 but in the process I want my fields in the portal to clear out so I can add new records that are associated with the new Job ID.  I wrote a script which allows me to add a record that automatically increments the Job ID but for some reason my portal still contains the same old records from the previous one and when you change the values in that record it will also change the values of the other records from the preivous records (and vice-versa) even if the Job IDs are different.

           How can I make it to work?

           Any suggestions/ help is deeply appreciated.



        • 1. Re: Adding a new Portal Record

               You appear to have two tables with a portal listing information that should be linked by Job ID to the current record in a table that seems to have one record for each job.

               I will refer to the layout's table as Jobs and the portal's as JobDetails. Job ID should be defined in Jobs as a number field with an auto-entered serial number. That way, no matter how a new record is created in jobs, each new record get's a new Job ID value and no scripting is required.

               Your portal should make use of the following relationship:

               Jobs::Job ID = JobDetails::_fkJobID

               If you enable "allow creation of records via this relationship" for JobDetails in this relationship, you can add new records in your portal just by entering data into the blank "add" row of this portal. When you create a new record in Jobs, the portal will automatically be empty until you create new records in JobDetails with a matching value in _fkJobID

               For an explanation of the notation that I am using, see the first post of: Common Forum Relationship and Field Notations Explained

          • 2. Re: Adding a new Portal Record

                 Thanks again PhilModJunk for your help.  I've been using FileMaker Pro for 2 months now and I just realize that I should try this approach using the portals and in the process got stuck.  Thank you again for your help and insights.