4 Replies Latest reply on Oct 15, 2008 2:39 PM by ceeslubbers

    Making new related records



      Making new related records


      I have coverted my FM files from FM 4.1 to 8.5

      I use these files for a customer database and make my quotations and contracts on it.

      in the original structure i copied and pasted key fields like company ID from one database to the other.

      noW IN 8.5 I still use the seperate original databases:


      2 questions:

      1. Is there an easy way to convert these seperate databases (incl layouts) to tabels within 1 database

      2. If i do not use copy+paste ID's what is the way to make new record in another database.
      so e.g. make new contact from company database.

      Is this don e by variables? How does this work?

        • 1. Re: Making new related records
             You don't need to put all the databases in one file to make this work as you suggest.

          In fact, I would reccommend that you get this basic functionality working before you consider moving the databases into tables in one file.

          It sounds like you have relationships working between the files, so all you need to set the key fields automatically is a portal to the related databases and a script to put some data into other fields in the portal.
          Also the option to create records must be on in the relationship.

          This portal can be on a "hidden" layout if you don't want to show it on your main layout.

          Let me know if you need more help with this.
          • 2. Re: Making new related records



            all files are related by coping ID's from one database to another.(oldstyle)


            so say I have a request for a quotation and wan to make  a new quote in the quotation database.


            I a make portal in request.fm related to quotation.fm


            How do I make the new record in  quotation.fm and move to this db to complete it?


            • 3. Re: Making new related records
                 You do this in a script.

              If you enable 'Allow creation..." in the relationship setup you will always have a blank line at the bottom for entering new records. The script makes use of that feature which also takes care of the ID field.

              Your script needs to perform the following steps:
              Go to the layout with the portal
              Go to field [a field in the portal] (This is only necessary if there is more than one portal)
              Go to portal row [last]
              Set any field to any value you need (not the ID field, it will be populated by the relationship)
              Set other fields as needed
              Commit record
              Return to the original layout or go to related record in the quotation.db to continue editing the new record.
              • 4. Re: Making new related records



                thanks for your quick response , Il try this over teh weekend and will come back to you.