3 Replies Latest reply on Jun 25, 2015 10:36 AM by AFrancis

    Incorrect and unrelated data being exported



      Incorrect and unrelated data being exported


      I'm baffled beyond baffled by this. 

      I have a fairly simple DB with member and company records, relationships that enable me to populate a member record with a company name and address via an ID lookup, and when I find a group of members based on their membership status, then export the found records, the company data in the file is often, but not always wrong for the members. In fact, some companies that show up as the member's company, are not, and never have been related to that member. EDIT - in fact, I just found that the incorrect companies WERE previously connected to the individual member, but are no longer. Seems the relationship is being cached or something and exports rather than the current up to date information. The file has been closed and opened MANY times since the company information was changed a couple of weeks ago, so I am still stumped - how do I get the current company information to export?

      The fields are Company::Company (from another table), CompanyID_FK from the main working table which creates the relationship to the Company table records by tying to the CompanyID there, and address fields also from the Company table, all in a tabbed layout object in my main member layout. I have the relationship set to allow creation, but not deletion of records through the relationship in both tables since any update should be recorded in both places.

      Where should I start in chasing this issue down? Has anyone else experienced this kind of 'corruption' (for lack of a better word)? 

      Thanks for any guidance!



        • 1. Re: Incorrect and unrelated data being exported

          I doubt that you have a corrupted file here.

          Sounds like something is wrong either in how you set up your relationships, how you set up your export or in the data stored in your tables--such as duplicated records that still link to the original company, though other explanations are also possible.

          You'll need to describe the details of your design before we can narrow down the list of possible issues to check.

          • 2. Re: Incorrect and unrelated data being exported

            I wouldn't call it corruption...yet.  It's just very possible you have some orphaned records.  Look at your relationship set up.  Do you have "create records based on this relationship" and 'delete records based on this relationship" checked?

            You didn't say how many records, but I would go to a layout based on the child records, make sure the foreign key is displayed.  Show all records, sort by that key.  Then you can see if you have any records, that match the Parent record that don't belong.

            • 3. Re: Incorrect and unrelated data being exported

              Thanks all - as often happens, it was a much simpler problem than it felt like... and I forgot the mantra, 'don't panic'. 

              So once I got out of perplexed mode, sobered up, as it were, I looked more closely at my fields on the main layout (members) - turns out the field for the company name on the main layout was not the company field from the parent (members) table, but the Company field from the company table (Company::Company). So it was reporting the name of the company I wanted, but was not changing the company name field in the parent (members) table since I did not have any mechanism at work to do that. 

              For now (to get the job at hand done) I exported the Company::Company field data along with the member data from the parent table, but will change it when I have time. The reason this all happened is because I was using a lookup from the company table to populate the record, but failed to notice this issue as it only happened to those whose records were updated, which are very few. 

              Thanks again!