7 Replies Latest reply on Aug 10, 2015 7:18 AM by justjill

    Data Merge Where Same Last Name Swaps Other Fields

    RawrArt

      I'm working on a data merge document of several thousand records (too many to efficiently rename anything by hand). In a record of employees, anyone who has the same last name as someone else gets their departments randomly scrambled among others with the same last name. So if there are two employees with the same last name, their departments are switched. If there are more, they are scrambled.

       

      I have 6 fields: First name, Last name, Box number, Phone extension, Department, and Job title. The only field that I am seeing problems with is Department.

       

      I have no idea why this is happened. It looks like it's all in InDesign. I really don't want to change these all by hand.

      The excel spreadsheet is accurate and has all the information arranged correctly.

       

      Any ideas?

        • 1. Re: Data Merge Where Same Last Name Swaps Other Fields
          Peter Spier Most Valuable Participant (Moderator)

          Version of ID? Data Merge is a little quirky in some versions and there may or may not be a workaround, depending.

          • 2. Re: Data Merge Where Same Last Name Swaps Other Fields
            peter minneapolis Level 4

            RawrArt wrote:

             

            I'm working on a data merge document of several thousand records (too many to efficiently rename anything by hand). In a record of employees, anyone who has the same last name as someone else gets their departments randomly scrambled among others with the same last name. So if there are two employees with the same last name, their departments are switched. If there are more, they are scrambled.

             

            I have 6 fields: First name, Last name, Box number, Phone extension, Department, and Job title. The only field that I am seeing problems with is Department.

             

            I have no idea why this is happened. It looks like it's all in InDesign. I really don't want to change these all by hand.

            The excel spreadsheet is accurate and has all the information arranged correctly.

             

            Any ideas?

             

            I can't guess why this happens; perhaps others on the forum know with some certainty.

             

            However, one workaround might be to create a unique identifier for each employee in a new column in the spreadsheet. After sorting the records as you like, use an Excel formula or Fill command to insert a sequential number for each row, in the new column's cell. Include the unique field in the merge in a tiny text frame, with white text color, or non-printing property.

             

             

            HTH

             

             

            Regards,

             

             

            Peter

            _______________________

            Peter Gold

            KnowHow ProServices

            • 3. Re: Data Merge Where Same Last Name Swaps Other Fields
              RawrArt Level 1

              On further examination, it appears that this problem only occurs when the employees have the same last name, AND their first name begins with the same letter. Very strange, and still no idea why it is happened.

               

              Oh, and it's InDesign CS5.

              • 4. Re: Data Merge Where Same Last Name Swaps Other Fields
                Peter Spier Most Valuable Participant (Moderator)

                Still waiting for a response to the version...

                 

                In the meantime, have you tried opeing the source file in a plain text editor like Notepad and resaving?

                • 5. Re: Data Merge Where Same Last Name Swaps Other Fields
                  Colin Flashman Adobe Community Professional

                  i don't think it's indesign - all indesign is doing is plopping text where the placeholders are. i data merge tens of thousands of records each month and have no issues with it... so far

                   

                  given that the excel file has to be saved either as a CSV or TXT file, have these files (NOT the excel file) been checked in a text editor like notepad or textwrangler? is it possible that there was a soft return or hidden character in the excel spreadsheet?

                   

                  when i have situations like this, i find out which record is the culprit via indesign's data merge preview; then go to textwrangler (with line numbers on) and go to the affected line.

                   

                  the actual merge... i'm assuming it is to a new indesign file (not an output PDF). No other post-processing has taken place like a GREP search/replace has it?

                  1 person found this helpful
                  • 6. Re: Data Merge Where Same Last Name Swaps Other Fields
                    RawrArt Level 1

                    Thank you cdflash for suggesting I take a look at the original data files. The problem was a weird sort error in Excel. Thank you all for replying!

                    • 7. Re: Data Merge Where Same Last Name Swaps Other Fields
                      justjill

                      That totally helped resolve my issue as well. Thank you!