Skip navigation
Currently Being Moderated

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

Nov 22, 2013 12:14 PM

Tags: #merge #styles #cs6

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

 
Replies 1 2 3 ... 5 Previous Next
  • Currently Being Moderated
    Nov 22, 2013 12:36 PM   in reply to LinaD36

    Can't really tell from those screen shots what styles are applied to the placeholders....

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 22, 2013 2:10 PM   in reply to LinaD36

    Lina,

     

    Would you paste two records, one with all info and one without, into a post? Saves making stuff up (I'm lazy).

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 22, 2013 3:14 PM   in reply to LinaD36

    Comparing the paste of data to the screen shots...man, there's a lot of pieces in individual fields. It is gonna take a little bit to reconstruct a spreadsheet.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 23, 2013 4:22 AM   in reply to LinaD36

    I know you have the CSV...but if I want to replicate what you are doing to help, I have to remake the spreadsheet from the merge data as presented in the thread. Easier if the data in the thread was from the spreadsheet rather than post merge.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 23, 2013 5:36 AM   in reply to LinaD36

    I am sending you a Private Message with a download link to a sample. Please respond in this thread as to whether it helps you or where it is going wrong.

     

    I was up for almost 24 hours and hit the hay early last night. I think I might have seen what I think is a problem last night if I hadn't been so tired.

     

    You are tagging the merge fields. Out of curisoity, why?

     

    The ZIP file I have linked to in a PM has an ID CS6 file and IDML (don't know what version for sure you are using), the tab delimited merge I used, and the Excel file. Likely I got fields wrong/misplaced going from the pasted data to a spreadsheet.

     

    Mike

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 23, 2013 2:16 PM   in reply to LinaD36

    Lina--did you check your PM and download, look at the sample file I provided? All is in parahraph styles with the exception of the character style used in the line:

     

    DB73147 11 hours1 minutes

     

    The hours/minutes text is the character style. You do not need to use Tagging. Just style the merge fields with the paragraph styles.

     

    capture-000776.png

     

    Mike

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 23, 2013 2:16 PM   in reply to LinaD36

    I'm not going to put words in Mikes mouth, but I think he was aking why there are what look like XML tags around all the text strings in the merged file.

     

    I suspect, too, that the problem may be that when you start out with null fields and remove blank lines you are essetnially shifting the following lines into the first paragraph.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 23, 2013 2:24 PM   in reply to Peter Spier

    Putting words in my mouth is better than the other day when I put my foot into it...

     

    Lina,  I do think it is the tagging and assigning paragraph styles to both the fields and tags that is fouling things up. Do take a look at the sample file. It will work fine for you to create it as per the sample.

     

    Mike

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 23, 2013 2:25 PM   in reply to Peter Spier

    Peter Spier wrote:

     

    I suspect, too, that the problem may be that when you start out with null fields and remove blank lines you are essetnially shifting the following lines into the first paragraph.

    Well I just ran a basic test to see if that's true, and it isn't, so now I'm back to wonderaing if you've really formatted things correctly. From waht you've shown us there's no way to see what paragraph styles are assigned to the placeholders. The easiest way might be to select the placeholder frame in the template, then switch to Story Editor view. Show us a screen shot of the story editor.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 23, 2013 9:05 PM   in reply to LinaD36

    Lina,

     

    Do check the tags panel. The reason is because those colored brackets that can be seen in your screen shot are tag brackets used for mapping styles to XML nodes.

     

    No worries. We'll figure it out together on Monday. Have a restful remainder of the weekend.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 25, 2013 9:25 AM   in reply to LinaD36

    In my testing here it didn't do that (though that was what I surmised was happening to you back in post 14), so I think it should not be happening, but the XML tags are somehow getting in the way.

     

    Mike is knowledgable in XML, and I am not, so lets wait and see what he has to say.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 25, 2013 10:14 AM   in reply to LinaD36

    I don't remember this happening in past versions. But I mainly use XML. And a quicky test converting your file to XML worked fine (and besides, it ends up all in continuous text frames...).

     

    I don't do much GREP. But you can do this via a Find/Replace.

     

    First, in your main document, you can delete the tags--but do this on a second copy of your working file!

     

    Change your Content Placement options to not remove blank lines (these are in the Datamerge panel).

    capture-000780.png

     

    Then after the merge, change the format of the two blank lines at the beginning of the records without the two lines of data:

     

    capture-000778.png

    Note the Change Format style is changing those two paragraphs to Title.

     

    Then rerun the find to remove the two blank paragraphs.

     

    capture-000779.png

     

    I suspect this can be done easier. I am sitting awaiting an appointment and cannot go much further than this for now, sorry.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 25, 2013 10:28 AM   in reply to MW Design

    If you don't remove blank lines from the merge, I think all that's necessary is to remove blank paragraphs. No need to mess around with changing any formatting.

     

    You can do that by GREP using Find ^\r and leave the change field blank. That looks for a paragraph return as the first character in the paragraph.

     

    Using Find ^\s*\r will also find paragraphs with nothing but blank space in them, or multiple empties as a single block (\s also includes \r as a match).

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 25, 2013 10:54 AM   in reply to Peter Spier

    Hey, first time I successfully logged in using my phone since the reset...

     

    Peter, removing the blank lines alone has the title line and style change to the genre style with local formatting. I don't have access to 5.5 or earlier with my laptop so I cannot try in previous versions until tonight.

     

    Is there a means to search for the locally styled genre style and change it to the title style?

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 25, 2013 11:16 AM   in reply to MW Design

    Mike,

     

    IF each paragraph has the correct style applied (and at this point that may be a big IF, since it may be the XML tags overriding the styles),

     

    AND the blank lines are not removed during the merge,

     

    THEN the Find/Change operation with the queries I posted above should not be changing any assigned paragraph styles in the merged document, so if the Title line had the Title style applied before Find/Change, it will have it after as well.

     

    Your previous files that you sent to me did not use discreet styles the same way they are arranged in the screen cap of the story editor, and that might be part of the problem.

     

    Going out for awhile, but I should be back in a few hours.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 25, 2013 12:03 PM   in reply to Peter Spier

    Looking forward to your return...

     

    Merge file...

    capture-000781.png

     

    After merge, before removal of blank paragraphs...

    capture-000782.png

     

    After removal of blank paragraphs using ^\r (and other F/R methods)...

    capture-000784.png

    This was using 5.5, same result in CS6.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 25, 2013 2:21 PM   in reply to LinaD36

    LinaD36 wrote:

     

    Peter, I also had another question for you related to apply a new Master page to these pages, once the data is correct. Is there a way to apply the new master so that it doesn't apply a new default text box on top of the existing text box that's there?

    Just don't use a master page that has a text frame on it where you don't want on.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 25, 2013 2:34 PM   in reply to MW Design

    Mike,

     

    That sure isn't what I see here...

     

    Here's a .csv file I made to test concatenation with commas inthe fields, along with a merge template, and a somewhat edited merged doc (with blank lines and some style changes inthe first frame, but you can play any way you like): https://www.yousendit.com/download/OGhjYUp3aFJiV3pIRHRVag

     

    Whe I run either of the queries from above I end up with the correct styles. Are you sure you cleared the change formatting? It should be empty, as should the find formatting.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 25, 2013 2:54 PM   in reply to LinaD36

    There wouldn't be one, by default, on any master other than the first one (master A) or a copy of Master A, or another "based on" Master A, and then only if you asked for one during document setup, or added it later yourself. You should be able to open any master page by double-clicking it in the Pages panel, and then you can select and delete anything you like, or add anything new you might need.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 25, 2013 3:03 PM   in reply to LinaD36

    Yes, Please. Very Much.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 25, 2013 3:46 PM   in reply to LinaD36

    Yep, me too. Thanks.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 26, 2013 2:28 PM   in reply to LinaD36

    Sorry, been out all afternoon, but I've been playing with your file, and I'm now totally perplexed. I get the same change as you in your file, and now I'm getting it with my file as well, and I swer that didn't happen yesterday, honest.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 26, 2013 2:43 PM   in reply to Peter Spier

    I think this is probably expected behavior. and I need to ponder this for a bit to see if I can think of a way to fool ID into behaving differently. Maybe I can get Peter Kahrel or Jongware to join us.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 26, 2013 4:03 PM   in reply to Peter Spier

    I heard back from Jongware who said he couldn't get the GREP to fail, but he doesn't have any experince with Data Merge, and that got me to thinking again about what I'd done yesterday. I applied the styles after the merge from a template designed for a different test. I just tried again with a text frame that had not had any connection to a data merge, and it works correctly, so it seems ther's something about the data merge itself that screws things up. I smell a bug, or maybe "feature."

     

    Just checked, and the problem is the find change behaves exactly the same as the remove blank lines -- it doesn't delete the field markers, and they have the styles attached.

     
    |
    Mark as:
1 2 3 ... 5 Previous Next
Actions

More Like This

  • Retrieving data ...

Bookmarked By (1)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points