6 Replies Latest reply on Apr 23, 2009 11:02 AM by DPK

    follow-up to "exporting one record from a portal" question

    DPK

      Title

      follow-up to "exporting one record from a portal" question

      Post

        Dear PhilModJunk - Thank you for your answer to AEH's question about how to export one record from a portal.  I work with AEH and we are both trying to solve this export problem. 

       

      I followed your directions.  I defined a new field in our main table that returns "yes" and named it "PrimaryKey".  And I created a new relationship linking two pairs of fields: MainTable::ID = EmailTable::ID  AND  MainTable:: PrimaryKey = EmailTable:: Primary. 

       

      The problem is that this relationship did not create a new Table Occurrence.. it only added the new links to the existing relationship box.  Everything hinges on the new relationships creating a new Table Occurrence.  Any ideas?

        • 1. Re: follow-up to "exporting one record from a portal" question
          philmodjunk
            

          Step 1, Go TO Manage | Database | Relationships and undo what you've just done so you don't mess up your database. :smileywink:

           

          Now click the Email address TO (table occurrence) you already have and click the button at the bottom of the window that has two green + signs. This will create your new TO.

          Drag fields to this new TO to create the relationship I've previously described.

           

          PS. you can kill off those pesky emoticons by editing your post to put a space between the colon and the letter "P".

           

          You can edit your messages after posting by pulling down the menu in the upper right corner above the Kudos control.

          • 2. Re: follow-up to "exporting one record from a portal" question
            DPK
              

            Hi PhilModJunk - - Thanks for your suggestion.  I did everything you said, but I must have done something wrong, because it didn't work.  I created a new field in our main table (tblPeople), named it "PrimaryKey" and I made it a calculation field (from tblPeople, = "Yes" ).  Then I created a new TO of our email table, named it Email_F_Primary, and linked the fields:  tblPeople:: PeopleID = tblEmail_F_Primary:: EmailID  and  tblPeople:: PrimaryKey = tblEmail_F_Primary:: Primary. 

             

            But.... when I export the field:  tblEmail_F_Primary:: EmailAddress, and then open it in Excel, I see that only 28 email addresses were exported, and it should have exported 364 email addresses.  But, that's not the worst of it.  Since I also exported the FirstName and LastName fields, and I can see that the email addresses are not lined up with the right names.   I've tried a variety of things in an effort to figure out what I'm doing wrong...but no luck.  I'm baffled.  Any ideas?

            • 3. Re: follow-up to "exporting one record from a portal" question
              philmodjunk
                

              Let's double check that relationship. If you open Manage | Database and double click the line linking tblPeople to tblEmail_F_Primary do you see:

               

                       PeopleID = EmailID

              AND PrimaryKey = Primary

               

              I think that's what you've done, but need to be sure. Your portal that lists your email addresses matches tblPeople:: PeopleID to tblEmail::EmailID right?

               

              If everything is correct so far, place a second portal on your layout next to the one listing all your email addresses, select tblEmail_F_Primary as its table and put the email address fields from this table occurrence in the portal. Do you see the correct records?

              • 4. Re: follow-up to "exporting one record from a portal" question
                DPK
                   Yes - The line linking tblPeople to tblEmail_F_Primary is correct as you stated it:

                 

                         PeopleID = EmailID

                AND PrimaryKey = Primary

                 

                However,  the line linking tblPeople to tblEmail appears as:

                 

                tblPeople:: PeopleID = tblEmail:: PeopleID 

                 

                When we set up this database, we were instructed to add a field called "PeopleID" to every table... and when we make the links between the tables, we were told to link the PeopleID in the main table to the PeopleID in the other table.  I assumed everybody did it that way.  Guess not, eh?

                 

                 

                 

                • 5. Re: follow-up to "exporting one record from a portal" question
                  philmodjunk
                    

                  Change

                   

                           PeopleID = EmailID

                  AND PrimaryKey = Primary

                   

                  To

                   

                           PeopleID = PeopleID

                  AND PrimaryKey = Primary

                   

                  That should fix the issue.

                   

                  • 6. Re: follow-up to "exporting one record from a portal" question
                    DPK
                       Fabulous!!  That did the trick.  The export works perfectly now!  Thanks so much for your help!  :P