8 Replies Latest reply on Oct 10, 2013 1:04 PM by DAndrews1969

    Data Merge

    rafa@mediatech Level 1

      Hi Everyone,

      I have to mail merge a postcard. Some of the records have an <<address 2>> and others dont. Is there any way I can tell InDesing, that if the record DOES NOT have <<address 2>>, to NOT make a blank space between <<address 1>> and <<City>>, <<State>> <<ZIP>>? See attached image, I think it makes more sense. Thanks for your help in advanced.

       

      Screen Shot 2013-05-20 at 5.00.16 PM.png

       

      --

      Rafa.

        • 1. Re: Data Merge
          Peter Spier Most Valuable Participant (Moderator)

          There's an option in the merge dialog to Remove Blank Lines.

           

          Keep in mind that a line is only blank though, if it contains nothing but a field with no data. Spaces or punctuation are not "empty."

          • 2. Re: Data Merge
            rafa@mediatech Level 1

            Peter,

            I'll give it a try. I'll let you know what I find. Thanks for your reply.

             

            --

            Rafa.

            • 3. Re: Data Merge
              DAndrews1969 Level 1

              I can get the removal of blank fields to work when the addres is stacked, i.e.

               

              Name

              Add 1

              Add 2

              Town

              etc

               

              but my problem is that in some artworks I have to list the addresses in a line, i.e.

               

              Name, Add 1, Add 2, Town, etc.

               

              If there is no Add 2 info I am getting a double space appear, which I can do a search and replace for afterwards, but if you do that, it then removes the data tag which I don't want to do, just in case the data is updated at some point in the future and Add 2 details are included.

               

              Does anybody have any suggestions how I may get around this or cheat my way around it, perhaps using grep styling?

              • 4. Re: Data Merge
                Peter Spier Most Valuable Participant (Moderator)

                Styles can't remove data, only modify text formatting, and you can only modify the format for actual text so I don't think this is an option. It's probably scriptable to remove the null fields, but that would mean if the data changes you'd need tor re-run, not update, the merge. I don't find that terribly onerous, but for a really long merge you might.

                • 5. Re: Data Merge
                  DAndrews1969 Level 1

                  There could potentially be around 1500 artworks that will have this scenario, so again I would have to ask anybody, is it possible to remove the double space whilst creating the data merge in the first place.

                  • 6. Re: Data Merge
                    Peter Spier Most Valuable Participant (Moderator)

                    The only way to remove "blank data" during a merge is to have it be the only thing on the line, or to rebuild the data source itself so that you are using a concatenated field in that spot.

                    • 7. Re: Data Merge
                      MW Design Level 4

                      Aside from scriptable, once the merge happens to a new document and is checked and found good, it looks to me that one could just do a search and replace in the document to snug things up.

                       

                      Mike

                      • 8. Re: Data Merge
                        DAndrews1969 Level 1

                        I think I see what you mean, If I have a column for Add1 and a column for Add2 if I then create a third column in the database and concatenate the two columns together and give it a new independent heading, I can use Add1 and Add2 in the stacked artworks and the concatenated data for copy the flows on and build a comma into the column at the same time.

                         

                        I will have a play and see what I can figure out.

                         

                        Thanks for the tip.