Skip to main content
thomaswm1983
Inspiring
July 18, 2018
Answered

Can I do conditional images with data merge?

  • July 18, 2018
  • 5 replies
  • 1327 views

I don't know if this has already been covered somewhere on here and I missed it. I have a very large client spreadsheet to put together some mailers. There are a few columns with Y or blank cells for certain certifications that will go on mailers to certain recipients. These are represented by logos. My question is, can i set it up so the correct logo will show up based on the Y designation on the spreadsheet without having to manually go in and place the file location for each corresponding graphic? At the moment the client supplied file has a different column for the three possible graphics with Y or N(left blank) depending on if the graphic is used or not. there are about 5k rows of data so i'd really like it if i didn't have to type them all out. My experience with spreadsheets is very limited so this might be a dumb question.

    This topic has been closed for replies.
    Correct answer Jeffrey_Smith

    This task will require either a third party plug-in or manipulating the source data. To manipulate data, you can use a series of find and changes as demonstrated below:

    Sample Data

    NameCertification 1Certification 2Certification 3
    JohnYN
    MaryNNY
    RobertY

    Select each column and search for Y, replace with name of graphic, repeat for each column

    NameCertification 1Certification 2Certification 3
    Johnabc-logo.aiN
    MaryNNxyz-logo.pdf
    Robertcc-logo.jpeg

    Select the three columns and search for N, replace with a space. Once completed, merge the 3 columns into one

    Name@Certification Art
    Johnabc-logo.ai
    Maryxyz-logo.pdf
    Robertcc-logo.jpeg

    5 replies

    Colin Flashman
    Community Expert
    Community Expert
    July 22, 2018

    I used to face this issue when applying eligibility logos on horse auction catalogues. The brief was that the primary sponsor would need to be in the top right, and subsequent sponsors appear on the top left e.g.

    The solution was to make two threaded text frames - start on the right and finish on the left - and in the text itself, use inline objects that were linked to the logos that were required.

    The data was set up in a way similar to Jeffrey_Smith's example, with the exception of putting them back into one column (as I may have more than one logo to add):

    I would then merge to a new file and be left with the following result:

    so the outcome is close, but not complete, because there are still empty frames here. That's when I run a script I wrote called empty frame remover to remove the empty frames, thus moving the left hand logo where it needs to be.

    The empty frame remover can be downloaded from my website for free: Scripts | Colecandoo!

    If the answer wasn't in my post, perhaps it might be on my blog at colecandoo!
    John Mensinger
    Community Expert
    Community Expert
    July 19, 2018

    thomaswm1983  wrote

    There are a few columns with Y or blank cells for certain certifications that will go on mailers to certain recipients. These are represented by logos. My question is, can i set it up so the correct logo will show up based on the Y designation on the spreadsheet

    I'm not sure you're equipped to do this, but if these "certification logos" are black-only symbols like UL or CE, each can be installed as a "dingbat" in the Y position of an otherwise empty font. Then, just set a field for that column and format it in the corresponding font. When the Y shows up in the merge, the logo will appear. I do this all the time and it works great.

    Community Expert
    July 19, 2018

    Good idea, John!

    To create a font with InDesign one could use IndyFont by Jongware and Marc Autret:

    Indiscripts :: IndyFont

    Regards,
    Uwe

    Jeffrey_SmithCommunity ExpertCorrect answer
    Community Expert
    July 19, 2018

    This task will require either a third party plug-in or manipulating the source data. To manipulate data, you can use a series of find and changes as demonstrated below:

    Sample Data

    NameCertification 1Certification 2Certification 3
    JohnYN
    MaryNNY
    RobertY

    Select each column and search for Y, replace with name of graphic, repeat for each column

    NameCertification 1Certification 2Certification 3
    Johnabc-logo.aiN
    MaryNNxyz-logo.pdf
    Robertcc-logo.jpeg

    Select the three columns and search for N, replace with a space. Once completed, merge the 3 columns into one

    Name@Certification Art
    Johnabc-logo.ai
    Maryxyz-logo.pdf
    Robertcc-logo.jpeg
    MW Design
    Inspiring
    July 19, 2018

    I use Em Software's data merge plug-in. I do conditional merges with it all the time--it's one of its strong suits.

    InData • Xdata » Em Software

    I cannot imagine ever doing merges beyond perhaps label addressing without it.

    Mike

    Randy Hagan
    Community Expert
    Community Expert
    July 18, 2018

    You can, but you're going to probably need a third-party solution like XMPie to pull it off.

    It's not cheap, But the good news is that the company is owned by Xerox, which pushes the capability as a must-have option for its DocuTech on-demand printing solutions. So a lot of on-demand printing operations have it. So perhaps a vendor can help get you where you want to be with your solution. To learn more about XMPie, click on the link above and check it out.

    Good luck,

    Randy