1 2 Previous Next 17 Replies Latest reply on Apr 7, 2017 1:14 AM by mz5005

    Restoring corrupted tables problem

    mz5005

      I have problems in several tables about sorting and selecting. The simple solutions like rebuilding indexes don't solve it.

      So I have decided to clone the whole database and import the data. There I run into a problem: I can not select the necessary lay-out.

       

      We import our LinkedIn (LI) connections. Because LI has a rudimentary export module ("everything or nothing"), we keep the LI info

      in a separate table that gets replaced with a new version every time (ALL CONTACTS).

      The unique identifier of a contact is its email address. So there is a table EAID which assigns an ID# to an email address.

      This ID# is the key to the (separated non-LI) part of the system.

       

      Steps taken:

      1. imported All Contacts table

      2. imported EAID table

      so far so good..

       

      Now I want to import the data from EAINFOALL (which has as key EAID) but I can not select the necessary layout in the import screen

      (can't show with open menu but the lay out is greyed out).

       

      I also tried to delete the EAID records and then directly importing the EAINFOALL data, but that gives the same result.

       

      How do I solve this? Any help greatly appreciated!

       

      Relationships.PNG

       

      SS_records_import.PNG

        • 1. Re: Restoring corrupted tables problem
          philmodjunk

          You don't select layouts in that dialog. You are selecting table occurrences--the boxes found in your relationship graph.

           

          If you are selecting import records from the File menu, you have to select a layout that specifies an occurrence of the table into which you want to import data. Thus, selecting the layout, selects the target table and you don't make that selection in the dialog shown. It only allows you to pick an occurrence of the same table as your current layout or the "new table" option if you want to create a new table.

           

          If, however, you are using the Import records script step, you can then select the desired table occurrence, not layout as the target table for your import.

           

          But if the tables themselves are damaged, importing records like this won't fix the damage.

          • 2. Re: Restoring corrupted tables problem
            mz5005

            thanks for your response philmodjunk.

             

            "But if the tables themselves are damaged, importing records like this won't fix the damage." --> no i do not want to import any tables, only the data.

             

            if i choose the proper layout - then do Import Records while leaving the right box as is on the Import Field Mapping box above, the result is that only the EAID gets imported - no other fields.

             

            so I assume the right way to go then is to make a script that imports all data into the right table.

            • 3. Re: Restoring corrupted tables problem
              mz5005

              i am stuck.

               

              with the import records script step i still need to choose a lay out so fmp knows where to store the data and get the same field box as before:

               

              SS2.PNG

              • 4. Re: Restoring corrupted tables problem
                wimdecorte

                mz5005 wrote:

                 

                i am stuck.

                 

                with the import records script step i still need to choose a lay out so fmp knows where to store the data and get the same field box as before:

                 

                 

                 

                As stated before: you really don't pick a layout but a table occurrence (TO).  You just seem to have your TOs named the same as your layouts.

                 

                But it is very important to realize the difference and save yourself a lot of misconceptions.

                • 5. Re: Restoring corrupted tables problem
                  mz5005

                  sorry my bad. i mix up the terms but i do understand the difference.

                   

                  but regardless of the terminology - what should i do?

                  i still don't get how to get my data imported into EAINFOALL given the above.

                  • 6. Re: Restoring corrupted tables problem
                    philmodjunk

                    It looks like you have not selected the file from which to import the data. First you select the file, then you select the table occurrence, then you map fields.

                     

                    "If the tables themselves are damaged, importing records like this won't fix the damage." --> no i do not want to import any tables, only the data."

                     

                    What I am trying to warn you is that simply importing records may not fix the damage as it may not be your data or indexes that has a problem. You might not even be able to import the data unless you first recover the copy from which you are importing the data.

                    • 7. Re: Restoring corrupted tables problem
                      greatgrey

                      Have you made sure the file you're importing from has a layout from the table you want to import from is active and the found set is the data you want to import?

                      Another way is to export to a merge file and import from it. A file for each table.

                      • 8. Re: Restoring corrupted tables problem
                        mz5005

                        @ philmodjunk:  "What I am trying to warn you is that simply importing records may not fix the damage as it may not be your data or indexes that has a problem. You might not even be able to import the data unless you first recover the copy from which you are importing the data. "

                        Ok I get it. I will try first to see with the most damaged table if this solves the problem. If not, I will recover the original file. thanks for the help

                         

                        @greatgrey: yes good idea. will use that if i cant get it working as discussed above. thanks!

                        • 9. Re: Restoring corrupted tables problem
                          mz5005

                          OK done it all - half of the problems are still there.

                           

                          Recovered the file - 0 damaged data sectors found - then cloned - then exported, and re-imported in clone all the tables.

                          Some sorting and selection problems still exist (and cost us a lot of handwork/time).

                          These problems do NOT exist in the stand alone export tables.

                           

                          I assume the lay-outs are damaged then and i should rebuild them from scratch?

                          (unlike with scripts i don't see a way to import them from back-ups)

                          • 10. Re: Restoring corrupted tables problem
                            wimdecorte

                            I went back to the start of the thread and I couldn't find a good explanation of what the sorting and selection problem actually is.

                             

                            I highly doubt that the layouts have anything to do with it so rebuilding those is going to be a futile exercise.  I think there is some crucial conceptual misunderstanding going on.

                             

                            Can you explain / demonstrate the problem?

                            • 11. Re: Restoring corrupted tables problem
                              mz5005

                              Sure WIm, here you go. We have a table MAILINGS (who got what mailing when).

                              The table has no problems: sorting works fine and selecting too.

                               

                              Select all mailings from October 20,2016

                               

                              Ex1A.PNG

                              • 12. Re: Restoring corrupted tables problem
                                wimdecorte

                                mz5005 wrote:

                                 

                                 

                                Some sorting and selection problems still exist (and cost us a lot of handwork/time).

                                 

                                Sorry, I'm confused.  In your last post you say that there are no sorting and selection problems but a few posts earlier you say that you do have them.

                                 

                                What I'm looking for is a good description (perhaps a screen video) of exactly what the problem is that you have after the import.  You are very focused on damaged objects (tables, layouts,...) but I think there is a conceptual misunderstanding going on somewhere and no damage.

                                • 13. Re: Restoring corrupted tables problem
                                  mz5005

                                  (sorry was not done yet)

                                   

                                  Ex1B.PNG

                                   

                                  All 779 records are from the correct date. So far so good.

                                   

                                   

                                  Now we go to another Lay-out we use MAILINGPREPARE2 and select records of people who receved the mailing on the same date as above: (all sorting works on mailing date field works fine is this lay out)

                                   

                                  Ex2.PNG

                                   

                                  Ex3.PNG

                                   

                                  Ex4.PNG

                                   

                                  Result: we get only a few records of the date we asked for and many we didn't ask for.

                                  • 14. Re: Restoring corrupted tables problem
                                    wimdecorte

                                    The main difference is that on the first layout you are actually searching in that table.  On the second layout you are searching through a relationship and that can produce very unexpected (but logical) results.

                                     

                                    An easy way out of this is to do the search on the date on the context of the where that date field lives and then do a Go To Related Record to the context of the 2nd layout.  I find that much easier to comprehend and troubleshooting in the future.

                                    1 2 Previous Next