2 Replies Latest reply on Aug 18, 2012 3:22 PM by cgmiguel

    Import new records after creating relationships



      Import new records after creating relationships



      I'm a brand new user of FM, and I've been using it so far to reorganize data I had collected for a research project years ago. I've done 4 tables and linked them with relationships. At first, everything was perfect, the relationships worked and my queries were ok, but...

      Yesterday, I decided I needed to add records in one of my tables. I used the import script to bring new records from an Excel file. The fields were all correctly filled for those new records. One problem is that I now have some relationships that work and others that don't. The 2 important tables in this problem are the following:

      Sites (with archaeological site names and their coordinates)

      Layer (with the stratigraphic layers and their associated C14 dates).

      On the Sites layout, I created a portal that shows (or is supposed to show) all layers in that site that have C14 dates.

      Basically,  both tables have a field called 'site' that are linked through the relationship. What is weird now is that the relationship seems to be still working between the sites and layers that were entered prior to my making the relationship. Any new record I add (through import or even simply through 'new record') in 'Layer' is not linked to any site even if the 'Site' field correspond to a valid site entry. Also, the portal for any site shows only the layers that were there prior to the changes. I figured maybe it was a glitch and tried re-creating a 'layer' table by exporting what I have now and reimporting it in a new table. But I just realized that only the records that were entered prior to the creation of the relationships are exported... I know this might be related to the 'allow the creation of new record through this relationship', but I've tried turning this on/off and creating new records/exporting records in both situations, and it doesn't seem to change anything. I don't really have the time to recreate this database from scratch, so any help would be appreciated.



        • 1. Re: Import new records after creating relationships

          Tables have relationships

          Sites Table      >------<  Layer Table
          SitesID Field   LinksTo   LayerIDField

          Tables have fields

          Sites Table Fields            Layer Table Fields
          ID Field                          ID Field
          Name                             LayerNumber

          Are there fields that are Auto-Entered Serial Numbers? Or ones that should be?

          What are the field contents of record that works?

          What are the field contents of record that does not?

          Oh, and when you import records, they go into ONE Table, unless you duplicate Rows and import a second time to the second table.

          • 2. Re: Import new records after creating relationships

            No auto-entered serial numbers. The linked field (Site) is taken from a drop-down menu that has the values from one and only list, so they are, without a doubt, the same.

            I just figured it out! I had linked 'Site' and 'Layer' through a 3rd table 'Artifacts'. Given that there was not an 'Artifact' entry for all records in 'Layers' or 'Sites, the links didn't go through. Just linked directly 'Site' and 'Layer' and it's working great! I guess I juts needed a break from it!

            Thanks though!