6 Replies Latest reply on Aug 21, 2014 8:15 AM by MW Design

    Data Merge and Update Content in Data Fields Option

    iamSmashy Level 1

      Figuring out data merge years ago really has been a life saver for me at the office! I seriously wish they had taught me about this in college!

       

      Part of the work I do includes creating multiple 'prize messages' for printed tickets given away as part of a game promotion in a grocery store. Sometimes there's over 300 different messages.

       

      I take all the information provided in excel... make it a CSV file, and then merge it into my template in Indesign. Easy Peasy! The messages typically look something like this after I do the first merge.

       

      Save $1.00 Off!

      Nature Valley Protein
      Cereal

      Cranberry Almond or Oat’s N’ Honey,

      310 - 465 g Carton 


      Next, I go through the messages, and add line breaks as necessary to ensure brand names and such are not broken awkwardly across multiple lines. Kinda tedious, but it has to be done manually.

       

      Save $1.00 Off!

      Nature Valley
      Protein
      Cereal

      Cranberry Almond or Oat’s N’ Honey,

      310 - 465 g Carton 

       

       

      Inevitably, the client will change products and descriptions, so we just keep updating the CSV file (which is still linked to my InDesign file) and then I choose the "Update Content in Data Fields" Option. The new changes show up, but I lose all of the manual line breaks I have already made.

       

      Is there any way to manually choose which lines from my CSV file that I want to update --- so I an avoid having to re-do all those line breaks each time? If you can think of an alternative solution to my work flow, I'd be happy to hear it!

       

      Thanks in advance everyone!

        • 1. Re: Data Merge and Update Content in Data Fields Option
          SJRiegel Adobe Community Professional & MVP

          You can't choose which lines to update, but there is a change you could make to your CSV to speed things up. Just find all the places you want those line breaks in the CSV, and put in some placeholder character that doesn't appear elsewhere in the document. (  §, for example )  Then, after the new merge, you just have to globally find the § and replace with a line break.

          • 2. Re: Data Merge and Update Content in Data Fields Option
            iamSmashy Level 1

            Thanks SRiegel, that could work. Would still be really tedious to set up all those characters in the 300+ line items in the live, CSV file I'm working out of with the rest of the team.  Looks like it's six in one and half dozen in the other

            • 3. Re: Data Merge and Update Content in Data Fields Option
              SJRiegel Adobe Community Professional & MVP

              Another option might be the "Find Change by List" script. Build a list of your brand names with a Change to field that includes the line break, then run the script after each new merge.

               

              I've never used this, so I can't swear that it would work, but it seems like a good option.

               

              I don't know if the find/change file can contain line breaks and still work -- if it can't, you could use the special character in the find/change, and then run a second change to get the line breaks in.

              • 4. Re: Data Merge and Update Content in Data Fields Option
                iamSmashy Level 1

                Thanks for the suggestions! Seems like most of my options would still involve some tedious things as a work around. I'll keep playing around and see what works the best for us.

                 

                If anyone else has any suggestions, I'm happy to hear them too.

                • 5. Re: Data Merge and Update Content in Data Fields Option
                  SJRiegel Adobe Community Professional & MVP

                  Another potential solution occurred to me this morning. Try adding the Balance Ragged Lines attribute to the paragraph style for the product name. That would fix your given example, and it will probably help with at least most of them.

                  • 6. Re: Data Merge and Update Content in Data Fields Option
                    MW Design Level 4

                    At least from your example, there is a manufacturer name (Nature Valley) and a product name (Protein Cereal). Regardless of the terms, if the breaks will always be like this example, I would make the Excel spreadsheet to hold these values in separate cells.

                     

                    If that is not possible (for instance, you do not have control of the data or the people supplying the Excel spreadsheet will not themselves separate the data), I would take the time to flesh out a copy of the find/change script mentioned previously for this repetitive task. Once it is done, all you need to do is to add any new info as it becomes available and run the script.

                     

                    Mike