Copy link to clipboard
Copied
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!
Copy link to clipboard
Copied
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.
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.
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/
Copy link to clipboard
Copied
I use EmSoftware InData for my data merge--it allows a simple script-type setup that can include if/else statements.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now