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

IF-THEN-ELSE For Merge?

Explorer ,
Apr 04, 2018 Apr 04, 2018

Is it possible to use a conditional statement in InDesign CC for merge? I have a document for creating nametags and one of the fields is optional. If a value isn't provided for that field, I'd like to print default text. Is there any way to do this?

4.4K
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

correct answers 1 Correct answer

Community Expert , Apr 04, 2018 Apr 04, 2018

As Mike points out, not without a plug-in.

That said, if you are using Excel to prepare the data, could the IF/ELSE statement be created in the data file itself prior to exporting as a txt/csv file?

Translate
Valorous Hero ,
Apr 04, 2018 Apr 04, 2018

Only using a plug-in. Likely a post-merge script could be used or even a f/r grep. At least for what I think is being described.

The linked thread was about conditional application of master pages during a merge. Same would apply to any merge when conditional merging is a good solution.

Apply master to pages with Data Merge?

My example actually was for name tags. But whether the condition is for changing master pages like in the example, it could be a single field and use replacement data during the merge.

Mike

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 04, 2018 Apr 04, 2018

As Mike points out, not without a plug-in.

That said, if you are using Excel to prepare the data, could the IF/ELSE statement be created in the data file itself prior to exporting as a txt/csv file?

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
Valorous Hero ,
Apr 04, 2018 Apr 04, 2018

Great thought, Colin. I should have thought of that!

If it is as simple as it appears in the OP's post, that should do nicely. The formula is fairly simple. I do this for way more complex text insertions in Excel.

Mike

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
Explorer ,
Apr 05, 2018 Apr 05, 2018
LATEST

I figured out that the easiest thing for me would be to (a) do the nametags in Word or (b) put the alternate text in the field in the data file or (c) do a search-and-replace after the 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