Highlighted

Remove data merge placeholders with missing data

New Here ,
Nov 20, 2020

Copy link to clipboard

Copied

I have a data merge setup which uses csv data in like this:
text1,@image1,text2,@image2,text3,@image3

 

The data is output from a server which can set the number of "sub columns", so that an output also can look like this:
text1,@image1,text2,@image2

 

In reality there are more than one image and text field, this is just as an example. Sometimes I only want to use two "sub colums" per page and leave the other columns become empty. But when I input a csv like that into indesign I get an error that there is missing data for some placeholders. I could of course let the server output a csv with empty fields but that would complicate things a lot since I sometimes need data without the empty fields. Is there a way in Indesign to quickly select and delete all data merge fields that have missing data? If it is possible via scripting that would be awesome!

TOPICS
How to, Import and export, Scripting

Views

22

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Remove data merge placeholders with missing data

New Here ,
Nov 20, 2020

Copy link to clipboard

Copied

I have a data merge setup which uses csv data in like this:
text1,@image1,text2,@image2,text3,@image3

 

The data is output from a server which can set the number of "sub columns", so that an output also can look like this:
text1,@image1,text2,@image2

 

In reality there are more than one image and text field, this is just as an example. Sometimes I only want to use two "sub colums" per page and leave the other columns become empty. But when I input a csv like that into indesign I get an error that there is missing data for some placeholders. I could of course let the server output a csv with empty fields but that would complicate things a lot since I sometimes need data without the empty fields. Is there a way in Indesign to quickly select and delete all data merge fields that have missing data? If it is possible via scripting that would be awesome!

TOPICS
How to, Import and export, Scripting

Views

23

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Nov 20, 2020 0
Adobe Community Professional ,
Nov 20, 2020

Copy link to clipboard

Copied

Plain ol Data Merge has its limitations, as you have discovered. You might want to look into InData: http://emsoftware.com/products/emdata/

 

The alternative would be to put some kind of filler code into the blank fields that you can then remove via Find/Replace or simple script. 

 

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 20, 2020 1