Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Thank You.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more