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

Insert Dynamic Image using Data Merge

Participant ,
Apr 24, 2019 Apr 24, 2019

Is there a way to have a Placed Image changed based to the record number of a data list?

For instance I have a mailer I'm sending out that uses the same .csv data file that contains addresses for Army recruiters, Navy recruiters, Air Force recruiters etc - The Army addresses are records 1 thru 100, the Navy addresses are records 101 thru 200 & the Air force addresses are records 201 thru 300 - Is there a way to change a logo file image that I have placed in my InDesign document change to reflect whether it is an Army Address, A Navy Address or an Air Force Address based on the record number of the .csv file?

Thanks

1.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
LEGEND ,
Apr 24, 2019 Apr 24, 2019

I think the easiest way to do this would be to add an image column to your CSV.

Then copy the appropriate image name down the column, and place the image along with your other data.

To make an image field, the header must begin with the  @  symbol.  such as @photos

in excel, you will have to put an apostrophe before the @ to force excel to see it as text    '@photos

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 ,
Apr 24, 2019 Apr 24, 2019

This can be done, but the information needs to be included within the data source.

In Excel (or data tool you are using)

- Create a new column in your data source

- For graphics in data merge, header name of column needs to include @ symbol, i.e. @logo

- Populate rows 1-100 with the name of graphic, i.e. army-logo.pdf

- Populate rows 101-200 with airforce.jpg

- Save/export the .csv or .txt file into the folder that contains all logo graphics for project

In Indesign, you can assign the @logo placeholder and perform data merge.

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 ,
Apr 25, 2019 Apr 25, 2019

Others here have already demonstrated how to make a database reference an image field.

What isn't so clear is that Data Merge doesn't have an if/else feature like Microsoft Word's mail merge does that can identify a change in one field and apply it to the other. This behaviour can be done in an Excel database first that uses an if/else formula to change the contents of a cell based on the contents of another cell. More information can be found here: IF function - Office Support

In your instance, you would have a field denoting army, air force or navy, and the if function would be written (loosely) to say "if army, then army.ai ,else if air force, then airforce.ai, else navy, then navy.ai"

Because the data is in three distinct blocks in your database, this level of detail isn't necessary and Jeffrey_Smith's advice is spot-on. However, if the data was all over the joint, or could change at any moment, then the if function would be a suggestion to consider.

If the answer wasn't in my post, perhaps it might be on my blog at colecandoo!
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
Participant ,
Apr 25, 2019 Apr 25, 2019
LATEST

Thank You.

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