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

Multiple record data merge into paragraph styles-applies the wrong style

Community Beginner ,
Nov 22, 2013 Nov 22, 2013

Hi, I've been working on this project for sometime and everytime I manage to get one part of the workflow to work another seems to break. My agency publishes catalogs in multiple formats: large-print, audio, braille, and HTML. I've been trying to redesing our work process so that the catalogs will be laid out from merged data out of comma-separated file. The data merges have worked fairly well in Word, but InDesign is a challenge. I'm merging multiple records on a page, like a mailing label. The paragraphs need to be formatted and I'm trying to apply a paragraph style to them. After much work, I think I've finally got the data merge to work correctly, but the wrong paragraph styles are applied. I'm going to apply a new master page to the data once the data is merge that uses the paragraph styles for text variable running headers and I need to build a table of contents based on the paragraph styles so I need this to work. Attached are some screenshots.

Master page set up for data merge with paragraph styles:

datamerge master page.gif

Here is the merged document with the wrong paragraph styles applied:

Merged document has wrong paragraph styles applied.gif

I have only a few weeks to get this process ironed out to keep to our rigorous production schedule. If anyone can help I would really appreciate it.

thanks,

Lina

44.2K
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
replies 185 Replies 185
Community Expert ,
Dec 21, 2013 Dec 21, 2013

The result just defies all logic. Good luck.

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 ,
Dec 21, 2013 Dec 21, 2013

Ah. Another finding: I did my experiments with InDesign CS5.5.

Your IDML indicates that you are using CS6 (DOMVersion of the Story_u774.xml is 8.0).

Is this a bug we are seeing here?

Uwe

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 ,
Dec 21, 2013 Dec 21, 2013

I'll run it in 5.5 to see if it's different. Back shortly.

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 ,
Dec 21, 2013 Dec 21, 2013

Same thing in CS5.5, and worse, I was wrong about the order being preserved in the text. If you compare the stitched and unstitched versions here you can see the order has been changed to 2-1-3-4...

Arrrghhhh.

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 ,
Dec 21, 2013 Dec 21, 2013

@Peter – I did not look in that attachment yet (are they allowed again here in this forum, then hooray!), maybe it's something else like different OS version? I'm on Mac OSX 10.6.8.

Will be back after looking into it…

Uwe

//EDIT: form => forum

Message was edited by: Laubender

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 ,
Dec 21, 2013 Dec 21, 2013

So everyone else remains in the loop...

Uwe and I have been trading emails and test files this morning, and it looks like I was incorrect about the order being preserved after the stitching and using copy/paste to move the text to a new file. It looks correct at a quick glance, but it isn't.

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 ,
Dec 21, 2013 Dec 21, 2013

Hah! I didn't look at the subject line and I thought I was replying to your personal mail, not the forum.

No, for mere mortals attachments are still disabled, but as I mod I seem to have elevated privileges. At least anyone who wants to see it can now take a look at the stitched and unstitched versions from CS5.5 that I made from Lina's first 35 records. I did not clear out field markers or empty lines in this test.

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 ,
Dec 21, 2013 Dec 21, 2013

This is what I get merging.

capture-000850.png

This is what I get when I delete all the pages, make the frame page-width, make it two columns, then autoflow the document.

capture-000852.png

And then deleting the double-returns...

capture-000851.png

Mike, using CS6

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 ,
Dec 21, 2013 Dec 21, 2013

Right. I'm merely mortal 😉

But on with that crazy issues:

Now that I briefly looked into your attachment of the CS5.5 IDML files, it seems, that we have two cases here:

1. A data merge with CS5.5 that assembles the units in the right geometrical order.
BUT not in the right creation order according to the (invisible) ID numbers of the text frames.
So my script does no good in this case…

2. A data merge with CS6 where the geometrical order is wrong , but the creation order of the text frames according to the (internal) ID numeration of the text frames (counted per page)  could be right… or could be dead wrong.

A hearty "Arrghhh" from me as well!

Will investigate further…

Uwe

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 ,
Dec 21, 2013 Dec 21, 2013

@Mike – ah, didn't see your results. The difference to Peter's master is, that you have a 2 x n-matrix and Peter is using a 1 x n-matrix regarding rows and columns.

What OS are you on?

Uwe

//EDIT: I meant to say columns & rows:
Peter: 1 columns and n rows
Mike: 2 columns and n rows

Message was edited by: Laubender

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 ,
Dec 21, 2013 Dec 21, 2013

Mike,

Did you run all the records? When I did that in CS6 I didn't see an error until page 5, so it seems a bit random as to where things go haywire, and you mightnot notice a swtich someplace in the middle.

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 ,
Dec 21, 2013 Dec 21, 2013

So with this all messed up, currently I cannot see an  algorithm to stitch all the text frames in a reliable order. Other than to compare the original data rows of the CSV files to the contents of the text frames on a page…

Uwe

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 ,
Dec 21, 2013 Dec 21, 2013

Yes, ran the whole Excel file I have. A quick scan of the records beginning on page 6, compared against the tab-delimited merge file I used shows they are in order.

Page 6 spread:

capture-000854.png

Page 66 spread:

capture-000855.png

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 ,
Dec 21, 2013 Dec 21, 2013

I'm not sure we're on the same page, pardon the pun, here. What I've been seeing is (seemingly) random pairs of records switching position in the thread, and the only way I know to verify that would be to check every record on every page against a list.

Adding a number field (that could be dlelted later) might make life easier for checking, as long as the numbers are sequentially matching the records. At leadt then you could scan through for numbers out of order, but you still need to check every one.

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 ,
Dec 21, 2013 Dec 21, 2013

Puns always work for me when I am only on my second cup o' Joe.

capture-000856.png

capture-000857.png

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 ,
Dec 21, 2013 Dec 21, 2013

@Peter – so I opened your IDMLs exported from InDesign CS5.5 and ran my script on the not stitched one.

What should I say, the text frames were stitched in the right order…

Maybe it's safe first to export to IDML after the merge and then doing the stitching on an opened IDML?

Uwe

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 Beginner ,
Dec 21, 2013 Dec 21, 2013

Wow, you guys are doing so much work! Uwe, I will try on Monday to export as an IDML and run the stitching script in an opened IDML.

thanks,

Lina

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 ,
Dec 21, 2013 Dec 21, 2013

@Peter – you are right – adding a number field with consecutive numbers would be a solution! At least a hook that a script can catch on and do the ordering accordingly (be it the right geometric order and/or the right stitching order).

Uwe

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 ,
Dec 21, 2013 Dec 21, 2013

And adding some minutiae to the process of opening IDML files with InDesign:

Every time you are opening an IDML file the page objects are redrawn from scratch. In that process (behind the scenes) new ID numbers are built for all the objects.

Maybe that's the difference that is counting…

But for now I will ring in my weekend 😉

Uwe

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 Beginner ,
Dec 21, 2013 Dec 21, 2013

I will merge in a number field too, but is there a way to put in the number field so that it can be easily deleted later?

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 ,
Dec 21, 2013 Dec 21, 2013

Mike, your two screen caps still prove nothing for me. All they show is those two spreads are correct, and not even that if the numbers are a numbered list. Your sequence on the next spread might run 150, 151, 153, 152, 154...

And the numbers MUST be a number list built into the records in order to show the sort....

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 ,
Dec 21, 2013 Dec 21, 2013

Lina, I think you could add a field to the template for the numbers (and obviously, I hope, add a column to the data file). You can then stick that field at the beginning of the record in it's own paragraph with a unique paragraph style. Once you are finished you can use Find/Change to search for .+ with that style selected in the Find Format dialog, and leave the change filed blank, which will replace it with nothing, effectively removing it.

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 ,
Dec 21, 2013 Dec 21, 2013

I added a sequential record number to the merge file...

capture-000858.png

I added the field to the ID merge document...it was added in front of

the Subject Code...

capture-000860.png

It only is in place when there is a Subject, else it is on its own line...

else it is in a blank paragraph.

capture-000859.png

I went through the entire merged and stitched file that I reflowed. The numbers are all correct. At this point I have no idea how to satisfy you that it worked. Other than give you my files. Which I would do if you really want them.

I'll simply leave the thread now. Good luck, Lina.

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 ,
Dec 21, 2013 Dec 21, 2013

Mike,

Your explanation totally satisfies me (at least as far as the current question ). If you'd said all that the last time I wouldn't have given you grief.

In case we don't have the opportunity later, I also want to wish all of you a happy holiday or your choice.

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 Beginner ,
Dec 21, 2013 Dec 21, 2013

Yes, Happy Holidays to you all! I will post on Monday with my results from these two tweaks that you suggested.

best,

Lina

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