Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Data Merge - How to remove blank lines?

New Here ,
Mar 30, 2020 Mar 30, 2020

Hello 🙂

I am working on a business directory, and I cannot figure out how to remove blank lines (ie. if a company doesn't have a fax number to just not have that line). I know about the check box in the "Create merged document" panel) - but it doesn't work for me. I am not sure if it won't work because of the way I have the text set up? This is my first time creating a directory so it is all new to me. I am importing the data from a .csv file. Screenshots attached. Thanks in advance for your help! 1.jpg2.jpg

TOPICS
How to
3.5K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 30, 2020 Mar 30, 2020

The way to remove a blank line from a data merge is usually to click the "remove blank lines for empty fields" checkbox in the content placement options document panel.

Screen Shot 2020-03-31 at 10.09.55 am.png

However, the line isn't truly blank: it has the words Fax(tab) in the line, so this checkbox won't work in this instance.

I'd recommend processing the document and getting rid of the blank fax lines once the merge has finished by doing a GREP change for ^Fax.\t$ and removing those entries.

Because data merge is in my opinion best at one page/one record entries, it isn't great at catalogues. Without getting a catalogue plugin, I have a video that shows workarounds to get the data merge text all into one frame: https://youtu.be/kTcvNQTYgrA

A more dangerous way is to make a numbered style as shown below and apply it to the line.

Screen Shot 2020-03-31 at 10.20.01 am.png

The danger is when the line is blank AND the preview box is checked on, because the line below will now be given the fax formatting.

My fellow ACP Eugene has written a further workaround to this that is worth reading: https://indesignsecrets.com/data-merge-remove-unwanted-lines.php and I too have written an earlier article about this behaviour: https://colecandoo.com/2012/08/10/no-fills-grep-styles-part-2-the-glitch-of-the-merge/

If the answer wasn't in my post, perhaps it might be on my blog at colecandoo!
From time to time, I hear the question: "how do I get a data merge to put the next records in the same textframe in a multiple record data merge"? Using nothing but data merge, there is no way to do this in one step, and this video will explain why. There are various ways to accomplish this task ...
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 30, 2020 Mar 30, 2020
LATEST

I use EmSoftware InData for my data merge--it allows a simple script-type setup that can include if/else statements.

David Creamer: Community Expert (ACI and ACE 1995-2023)
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines