I haven't looked at third-party solutions much and so the only product I am aware of that can apply different masters during a merge would be InData by Em Software. I suspect there are others too. However, I am uncertain it would actually work in your stated work-flow. And it is outside of your target price.
I dont know whether what i understood is correct, but what you can do is convert that data record into three different records based on your requirement and then apply each data record to the corresponding layout. Separation into three files can be done with any suitable programming language. In case you dont know that, provide me your data file and i will try my best to provide you with 3 different files.
Splitting it into three separate data merges would work, but would result in three separate output files that would have to be merged. Recreating the original sequence manually would be tedious.
A simpler solution would be to have all three masters invoked as part of the data merge. Each data record would create three pages in the merged document. Then the manual task is to delete the "wrong" pages. Still time-consuming, but less tedious than merging three documents.
But neither approach as simple as what I think could be implemented relatively easy in InDesign: Allowing the choice of master to be determined by data within the record.
I have used different ID files for different layouts manually before. Page start numbers need to adjusted in each file. But combining them in Acrobat isn't a big deal.
And I suppose one could use the book feature, though I prefer not to. As well, once merged one can make a master document and place the resultant ID files in it. If I recall, I did this once. And if I recall, I needed to import the masters into it first. But my memory is hazy on that. It was when first introduced (CS3 I think).
Unless I am missing something, merging the documents in Acrobat would be tedious. Data records can be in any order: A, A, A, B, A, C, B, A, B, C, B, B, B, B, A, C... If I make an ID file for A's, and one for B's, and one for C's, I'd have three output files: A, A, A, A, A, A; B, B, B, B, B, B, C, C, C. I can combine the output easily enough, but that would mean having a file with: A, A, A, A, A, A, B, B, B, B, B, B, C, C, C. I would then have to figure out where to drag each page. For more than a few records, this would get unwieldy.
If I put in all three masters so that each record results in 3 pages of output, it would look like this (with the lowercase letters representing the "bad" pages): A, b, c, A, b, c, A, b, c, a, B, c, A, b, c, a, b, C, a, B, c, A, b, c, a, B, c, a, b, C, a, B, c, a, B, c, a, B, c, a, B, c, A, b, c, a, b, C. I think it would take much less time to delete the unwanted pages
Well, beyond a commercial plug-in, it will simply be manual work no matter how you do the merge, I think. My use of separate merges are basically different sections within the eventually combined file (whether combined in ID or Acrobat) which change, but they are in reading order.
What are the master page elements? From what little I can understand you are changing master pages within logical sections. The only solution apart from manual labor is the above plug-in (I think). Without knowing what it is about the layout changes (master pages), that's all I can contribute. Sorry.
Conceptually what I want is for the 10th field in my data record to tell InDesign which master page to use before merging the data from that record.
Triggering a master using data merge... no, at least not from InDesign only. VDP software such as XMPie (i pick this because I have used the trial version) can do this, BUT it doesn't fulfil the next requirement of being <$100, and I don't think you will find ANY VDP solution for that.
Instead, I would suggest an alternative. Rather than triggering a master page, I would suggest making a frame in the background of the page that uses a data-merge image field, so if you are changing letterheads mid-stream based on the data in the job, this will work. The catch is, there's no way indesign's data merge will trigger this by itself based on the data in the file. Instead, the data would have to include an additional field that reflects the relevant page background, and if using an excel spreadsheet to make the data, would require some creative if/else statements.
So it is possible. It slows down the processing of the file tremendously, and I'm not sure how many records are being merged.
So far as is it scriptable? Yes, most things are scriptable in InDesign. Is someone going to volunteer to prepare such a custom-script for nothing... unlikely.
The format needs to change page by page, not section by section.
I appreciate your efforts. The current "documentation" for Adobe products makes it difficult to research a topic like this without turning to the community. I'm glad the community exists and has so many people, like you, willing to lend a hand.
Thank you. I wasn't looking for someone to write the script -- just didn't want to waste time looking for something that wasn't there. I haven't written any scripts for ID, but have written plenty for Photoshop -- which should give me a head start with ID scripting.
I got this project done using the brute force method. That gives me some breathing room to write the script so that the next time around, I can let the computer do the grunt work.
Yep, after seeing your diagram of the pages, I understood the page by page thing. I was just writing about what I typically see when I need to use different masters.
did you manage to solve this? I too have several different masters and want to define which is used via the data source.
As far as I know, no one has written a script for this. But I haven't kept up on the happenings around here for some time.
The below screen shot is from a sample of name tags I made up for someone. I use the plug-in I mentioned at my first post very frequently. In this example, there are 3 master pages with a different color background. The merge code will choose a different master page when the business name changes, and then there is also a default color for non-business entities.
The sample has been merged to single page size (the size of the name tags +bleed) and then imposed to a tabloid page size.
But as mentioned, I know of no freely available solution.
BTW, I got to thinking about how I would handle something as simple as the above if I didn't have the plug-in. And that would be only possible if what was contained on the master page could be included in a PDF that when merged was the background of the names (in the case above). Then I would create a PDF for the colors (in my example). A PDF is no different than an image. I would need to fill the data source with the appropriate PDF name (as one does with an image in a merge file). Then that PDF could possibly be used for what would otherwise be on a master page.
mmm - not really. Thanks though. Looking for a more robust system for all my project workflows. I've been looking at XML too which seems better in many ways but still now obvious way to do this.
Not much more robust than a third-party solution like EmData or a catalog software (yet even more money).
XML, at least insofar as my experience, cannot choose master pages. there is also a goodly learning curve. It is also the most rigid of import formats.
Tagged text, which I use a lot, can build elements on the fly and also choose master pages upon importing. But one needs to either be well-versed in whatever/wherever the data source is coming from so the text can be properly exported. (That is also true of XML.)
Good luck. Without knowing more of your requirements and goals, all the above is general information.
I looked through this post for the diagram of pages that one person referenced but couldn't find it. It's hard to envision what you're trying to do but text variables come to mind. You could create a text variable that looks at the style applied to that 10th entry on the page and have the variable display the last item on the page. Of course if there's more formatting changes required, then maybe this isn't the solution you're looking for but Colin's idea of using an image field might get you close as well.
If it is simple, such as only graphics that are changing in the background but text staying in the same place then I would just export the three master backgrounds as an image and then assign the background to the appropriate record using @master in the database. If the position of text change then a third party app would be needed I believe.
Data1 Data2 @master
John Smith Background1.jpg
Jane Smith Background3.jpg
Joe Smith Background2.jpg