Data Merge: Layout Adjusting to Varying # of Fields?

Greetings all,
A friend is producing a PDF report for different countries to show what diseases exist in each country. I think a data merge might work, but she will want to list information only about diseases that are present in a given country. Right now, there are blank / null cells in the spreadsheet for non-applicable diseases. Essentially, we’d like to collapse the display of any missing data fields (and its accompanying table) so that only relevant data is shown. So if we had three diseases total (A, B, C) and only two were present in a country (A & C), we’d like to produce:
Table. Disease A
Info, data in table
Table. Disease C
Info, data in table
Is this possible using InDesign’s data merge (or another feature)? Perhaps using content placement options? Any other ideas? I think the goal is to have different tables for each disease, though I’m not sure if that will affect the process. Many thanks in advance for the help; my InDesign experience is very limited!
Sincerely,
Eric

Awesome, thanks Eugene! I'll do some reading on table looks and styles. It sounds like we may be able to suppress tables if all their fields are left blank (or something similar)? If another question comes up, I'll post a mock-up of the final product.
Many thanks for the prompt reply.
Eric

Similar Messages

  • InDesign data merge isn't pulling in all fields, seems to be confusing some fields

    Hi there - I'm trying to do a data merge in CS6 for about 450 address labels. The labels are 10-up so I made a .csv file with 10 equal sets of colums (named Firstname1, Firstname2, Firstname3, etc.) and merged those into my label document. I've done this before plenty of times with no problem, but for some reason this time the merge seems to be getting thrown off by something. I can see multiple places in which the merge will stop after a certain field - usually the address - then there will be a bunch of blank labels, then on the next page the address from the last label will start up again. I've attached a screen shot of what it looks like when the address breaks like this. In the top image, Troy Christian's merge breaks after the street again. Then a few blank labels follow, then Troy's city, state, and zip appear at the beginning of the next page. Then it continues on with the next address block (inserting commas along the way for some reason), then it breaks again.
    I've scoured both the merge fields and the Excel file - nothing seems out of the ordinary - resaved the Excel over and over as both .csv's and .txt's, and can't get it to fix. Any ideas here?? Please let me know if there's any further info I can provide.
    Thank you!

    We didn't end up even looking at it in a text editor, although that probably would have been easier - we just saw where the errors were occurring in the merge and looked carefully at those cells in the .csv file, and then deleted line breaks, commas, and weird characters. Worked like a dream.
    Thank you so much for your help on this!
    e

  • Data Merge for addresses, wont remove blank fields

    Sometimes it works, sometimes it doesnt.  Today it worked for a file, came back to it late with nothing unchanged and it wasnt working...
    Im working with addresses for data merge and everyhting works fine but with the fields (like Address 2, Address 3, etc...) that are unused, I have it set to "Remove blank lines for empty fields" in the options but it will not work.  Why doesnt this seem to work?

    It didn't work in CS2.
    I was told that it was initially broken in CS3, but later fixed (I cannot confirm as I skipped that version).
    It doesn't work in CS4.
    So, apparently Adobe managed to break a feature that did work, but haven't fixed it again.
    -mt

  • Data Merge Layout Options

    I am using 5.0.3. on my mac with Leopard 10.5.5
    I created a master layout, with a table for a data merge. The table appears on the page one time, but there is definitely room to have it appear more than once.
    I want to have the first record appear on the page, and then the second record appear on the same page.
    When I click Create Merged Document, the RECORDS tab will not let me select Records Per Document Page; it is greyed out on Single Record. Therefore, when I select the Multiple Record Layout Tab, I cannot set margins or do anything, since it says the options are disabled because Single Record is selected for Records per Document Page.
    How do I fix this?
    Thank you -
    Marion in Rochester

    I figured it out.
    My master layout was only 1 page but I had inserted about 26 pages in the document, in anticipation of the merge.
    once I removed all but one page, everything was fine

  • Data Merge FYI - can't name a field "table"

    I spent an hour today trying to figure out why my wedding place card data merge wouldn't work. I wasn't even getting an error message so it was hard to identify the problem. It turns out that you can't have a field named "table". Just thought I'd get the word out there as there seems to be no mention of it in InDesign Help.

    Yeah, I resaved the source both ways, and even copied/pasted it into a brand new TextEdit file. Maybe the OS has something to do with it; I'm running Mac OS X 10.5.8. Just now, I opened a new TextEdit file and typed up a new one-field, one-record source file, and sure enough, it didn't work. But when I deleted the "e" in "table" and resaved it, it worked just fine.

  • How to create new field groups in AA master data screen layout?

    Hello,
    We are using ECC 6.0
    We have created bunch of new fields for asset master data, but we want to make them visible only for particular asset class. So we need to customize in SPRO Asset Master Data Screen Layout, but there no specific field groups that we can customize. So how to create and add new field groups to manage them by radiobuttons Required, Optional, No or Display?

    hi,
    think, it's not possible.
    look here:
    http://help.sap.com/saphelp_47x200/helpdata/en/4f/71e05a448011d189f00000e81ddfac/frameset.htm
    "The field groups and their respective fields are defined in system tables"
    kind regards
    Andreas

  • Linking Data Merge Field with JavaScript for PDF link

    Hello everyone,
    I am using the data merge in InDesign to generate a PDF with data from a data source file. The data merge will populate a Product Number field. I want to write a script that will modify the Product Number field to contain a JavaScript Link in the resulting PDF.
    For example, the product number [1234-567] will launch: app.launchURL("plsddr://localhost/1234-567|*", true); when the Product Number link is clicked on in the resulting PDF.
    Can anyone provide an example on how this could be done, or point me in the right direction? If there is a better way to go about this, please let me know.
    Thanks!

    What findText returns is a list of Text, but that's totally interchangeable with Word. It appears InDesign can switch at will between Characters, Words, Lines, Paragraphs, and Stories.
    Text can consist of one single SpecialCharacter (a column break, or a hard return, or any of the SpecialCharacters enumeration), or of a standard JavaScript "String" object -- a simple Unicode string.
    The property that 'holds' the text is "contents" -- so, adding all of this up, to 'get' the text that has been found, you'd typically use
    next = list.pop();
    alert ("The text contents of this one is '"+next.contents+"'");
    and you can build further on that -- using it as a HyperlinkDestination URL, or something like that. The Text item -- 'next' -- still points to the 'live' text it was found at, so be careful not to modify it. Doing something like
    next.contents = 'hey what happened';
    will change the actual text in your document. But it's also useful to add, for example, a hyperlink to the actual position this text was found on.
    (A tip regarding changes: if you are to change your document, the original items findText pointed to will be messed up after you changed the first one! To prevent that, work backwards from the last item found to the first. findText(true) will reverse the order of found items, from last to first -- see the JS Help on that.)
    As for
    (Also, how do you print the contents of a Word object?)
    that depends on what you mean with 'print' . To a printer?

  • How to build conditional text from a data merge

    Hi there
    I'm hoping this is not a long shot but I do have a rather large ask (I think). 
    I cannot figure out how to create conditions on values.
    We have two areas that require conditional text. See these areas on the attached image. 
    Features offered - up to 6.  These are identified by defining each feature with a letter, eg 'n' stands for tent site and 'L' stands for seasonal work,  and
    Room type offered - four colour codes with this. These range from "not made up", "made up", "ensuite/madeup" and "ensuite".
    The tab delimited file contains numerous columns for each room type - single, double, twin, share and dorm rooms that offer the 4 room type categories - see point 2 above. 
    I cannot figure out how to clarify the conditions I require for the conditional text.
    Do I start with making 4 conditions for each room type colour and so-on for the rest of the room types ie single not madeup, single madeup, single madeup ensuite and single ensuite? 
    And if so, how do I create these using the correct conditional code?   Does GREP have anything to do with this and do I need to use its metacharacters like \?
    Can someone perhaps start me off?
    The same goes for the features.  The features are displayed in the spreadsheet per column with either a 'yes' or a 'no' displayed.
    I hope I have provided enough information to get some assistance.
    Thanks so much.

    Tag Design wrote:
    Hi there
    I'm hoping this is not a long shot but I do have a rather large ask (I think). 
    I cannot figure out how to create conditions on values.
    We have two areas that require conditional text. See these areas on the attached image. 
    Features offered - up to 6.  These are identified by defining each feature with a letter, eg 'n' stands for tent site and 'L' stands for seasonal work,  and
    Room type offered - four colour codes with this. These range from "not made up", "made up", "ensuite/madeup" and "ensuite".
    The tab delimited file contains numerous columns for each room type - single, double, twin, share and dorm rooms that offer the 4 room type categories - see point 2 above. 
    I cannot figure out how to clarify the conditions I require for the conditional text.
    Do I start with making 4 conditions for each room type colour and so-on for the rest of the room types ie single not madeup, single madeup, single madeup ensuite and single ensuite? 
    And if so, how do I create these using the correct conditional code?   Does GREP have anything to do with this and do I need to use its metacharacters like \?
    Can someone perhaps start me off?
    The same goes for the features.  The features are displayed in the spreadsheet per column with either a 'yes' or a 'no' displayed.
    I hope I have provided enough information to get some assistance.
    Thanks so much.
    Maybe I'm missing something, but I can't see why you need conditional text. I can see that you may want to color each property in each category differently, to stand out for quick visual communication.
    If each feature (attribute) of each property or venue is represented in one spreadsheet row (record,) you can use data merge to create the whole entry for each property. For example, a property may offer two types of rooms - single and double, and the single may be available as "not made up" only, while the double is available as "ensuite/madeup" and "ensuite."
    In the spreadsheet, in the row for the Acme Inn property, which only offers single not-made-up and single ensuite/madeup rooms, and for the Ajax Hotel property which offers single made-up, single ensuite/madeup, and single ensuite rooms, the cells that contain the data for the merge fields would look like this:
    Property ID
    single not-made-up
    single made-up
    single ensuite/madeup
    single ensuite
    Acme Inn
    $50
    empty cell
    $75
    empty cell
    Ajax Hotel
    empty cell
    $65
    $75
    $85
    On the data-merge layout, each room type's label would be followed by all four data-merge field placeholders, with colors applied, so the single would look like:
    Sgle: <<single not-made-up>> (red) <<made-up>> (yellow) <<ensuite/madeup>> (green) <<ensuite>> (blue)
    NOTE: The colors are applied with named character styles to the data-merge layout in InDesign.
    [EDIT] BAH! I applied colors to the text when composing this post, but they were removed when I posted. [/EDIT]
    When you set up the merge with Remove Blank Lines for Empty Fields enabled (checked) so the empty cells are ignored, the result resembles this:
    For the Acme Inn:      Sgl: $50 (red) $75 (green) $85 (blue)
    For the Ajax Hotel:    Sgl: $65 (yellow) $75 (green) $85 (blue)
    The separator character between the prices in your example is a special issue. It could be solved in the spreadsheet by creating calculated columns between the price columns, with "IF" formulas that test for values or empty cells and display the separator or nothing. If you choose this method, you'd need to insert fields between the placeholder fields, to hold the calculated fields' contents.
    Another approach here would be to follow the data-merge process with a GREP script that inserts separators where they're needed.
    Search Google for terms like "InDesign data-merge tutorial," "InDesign data-merge remove blank lines," "InDesign multiple records per page," and similar phrases without quotes.
    HTH
    Regards,
    Peter
    Peter Gold
    KnowHow ProServices
    Message was edited by: peter at knowhowpro

  • Data Merge with Lookup

    i need to create a date merge document that includes a lookup field.
    What we need is for one field to be a dropdown with list of all the options, when one of the options is selected the rest of the fields in the document is populated with the relevant information

    That is not what data merge does. Think about it more along the lines of a mail merge.
    I think you’re going to need to do this in Acrobat at a minimum and perhaps even LiveCycle.
    I’d pop over to the Acrobat forum and see if anyone there has any scripts to help automate this.
    Bob

  • Digital Magazine layout & data merge issues

    If anyone can help or offer some advice on the following I would be extremely grateful.  My main problem is applying a data merge to either an existing layout I have created or creating a layout from scratch but having varying box sizes containing merged data and specific numbers of records on particular pages.
    The brief is:
    Create a 28 page digital magazine.
    The magazine will be published either weekly or fortnightly and contain around 500 'listings'.  Each listing has an image, and 4 pieces of variable text.
    My initial plan was to manually enter the listings information - this will take far too long each week.  I am hoping to keep the same layout each week but just change the data on the listings pages by creating a new .csv file each week and applying it using the data merge feature.
    22 of the pages contain 'listings'.  The remaining pages are editorial.
    I'm relatively new to data merge in InDesign.  My knowledge of it's feature is limited to being able to create multiple records but they are all the same size and I don't see any options where I can designate how many records I would like to appear on a particular page and to then keep that layout so I can come back to it each week with a new .csv file and literally just drop it in and i'm done.
    I need the layout of the 'listings' pages to vary so that in some cases there are 30 listings (records) on one page and on other pages there are 23, some are to have 35 etc.  Also on the pages where there are 23 listings - the first 3 listings are to take significantly larger amoutns of space on the page (as featured listings of the week).
    If anyone has used data merge in this way before and can help please let me know.  I have produced a complete layout of the magazine but i'm guessing i'll have to scrap this and start again if I'm going to start using data merge.
    thanks in advance!
    Mark

    like i said, the XML learning curve is steep as indesign's ability to handle XML on its own is pretty user unfriendly, but ID does get the job done.
    depending on how dirty you want to get your hands, there is an additional book in conjunction to the title i'd mentioned earlier, and it is called "InDesign CS5 Automation Using XML & Javascript" by Grant Gamble which you may want to read. however this is a LOT to digest and certainly not for anyone unfamiliar with programming in javascript.
    is the data for the publication exclusively coming from excel or is it coming from Management Information Software (MIS) which can export XML information? excel on a PC can generate XML but it is useless as a jelly pickaxe as there is a lot of extraneous information saved with the exported XML file.
    there are several people on this forum with a wider experience on this topic than me, and hopefully they are reading this and can carry on with more detailed explanations.
    i'm used to using online converters to take csv files to convert them to XML but the only real advantage of using XML generated this way is to create variable data which flows on in the same text box. This is opposed to ID's data merge which would not flow on the information but instead start the next record in a brand new text box, meaning if an entry has to move from the start to the end, it means making the merge again, whereas if an XML file was used i could simply open up the structure pane and move the record from record 1 to the last record.
    AFAIK apart from indesign and the MIS used to generate the data, i believe that a piece of software called oxygen XML would help in editing the XML once it is generated, but i do not use oxygen XML myself, but perhaps other readers do and can assist you.
    FYI, the project you are talking about is remarkably similar to one which i deal with at work... but we only ever receive the finished art as a PDF, but it appears that the construction method was the same as your idea - that is, take database file, parse it through indesign using different templates and then output it to a media, in my case a printed magazine. unfortunately i can't tell you exactly how they made it as it is proprietary to the client.

  • Accounting for varying values in Data merging

    Hi everyone,
    I've been asked to create a template for a degree certificate. So far I've created an InDesign document and used data merge to import the data from a .csv file. I've also used GREP styles to resize the name of the degree when it's longer than a certain number of characters. So far so good.
    My question has to do with how to account for different categories of certificates. Let me explain. In my spreadsheet I have thre types of certificates A, B, and C. Each category triggers two specific bits of text. So for example:
    When Cat = A
    the following blurb appears at the top of the certificate:
    WHEREAS THE UNIVERSITY OF NOWHERE HAS BEEN EMPOWERED BY ACTS OF THE LEGISLATURE OF MARS TO CONFER DEGREES AND AWARD DIPLOMAS OF THE UNIVERSITY
    and the following text appears just before the name of the degree:
    HAS BEEN ADMITTED BY THE UNIVERSITY TO THE DEGREE OF
    When Cat = B
    the following blurb appears at the top of the certificate:
    WHEREAS THE UNIVERSITY OF NOWHERE HAS BEEN EMPOWERED BY ACTS OF THE LEGISLATURE OF MARS TO CONFER DEGREES AND AWARD DIPLOMAS OF THE UNIVERSITY
    and the following text appears just before the name of the degree:
    HAS BEEN AWARDED THE
    When Cat = C
    there is no blurb at the top of the certificate.
    but the following text appears just before the name of the degree:
    HAS BEEN AWARDED THE
    I first thought of creating IF formulas in Excel but it doesn't work because I don't want the result to appear in the data, I want it to only appear once merged in the InDesign template.
    SO THE QUESTION IS:
    Is there any way to specify IF THEN values directly in the InDesign document? If not, does anyone have any idea if what I'm being asked to do here is even possible?
    Any help or nudge in the right direction would be greatly appreciated,
    Chris

    Hi Christine,
    I'll need to work through the example, but it would be that the blurbs are on thier own separate layers of page 1. And the data fields are simply on their own layer, still on that page.
    That's as far as I got in a quick perusal of his example. I plan on recreating the example tonight when I have a bit of my own time to spend. I suspect it will be a lot more clear following the example, bit for bit. If it does work out as it seems it should, I can think of a. coupon job I merged that would have (maybe) been easier than the 5 merge files I ended up with.
    I do want to mention, pointing back to my earlier comments, if there is anyway you can work with the IT people to produce a clean file ready for you, I would do so. Colin mentioned XML, and that is what I would strive for in this situation. But XML is a bit like being thrown into the deep end of the pool and learning to swim at the same time.

  • Data Merge not picking up all data fields

    Hi,
    I've been having a problem, posted here: http://forums.adobe.com/thread/1217090
    Essentially, I have been using the script 'CSV2Tables' to prepopulate simple 2 column tables with information drawn from a CSV data source.
    The tables consist of a title, and a block of information about that specific subject. Many of the blocks of information I am importing also contain data tags (<<DataTag>>)
    The plan is to use CSV2Tables to populate the tables, then change data source and run a normal ID Data Merge to replace all of the <<tags>> within the tables with information from a second CSV data source.
    The problem is, CSV2Tables is importing the data and prepopulating the tables just fine, but the data tags that are found within each body of text are being picked up as plain text (as Peter Spier has pointed out, they are being drawn from a plain text stream rather than being dragged from the Mail Merge panel) so when I try to run the ID Mail Merge, none of the fields are found within my document.
    My question is - is there a method, or script available out there that can essentially do a Find/Change within a document, and replace plain text that appears like this <<PlainText>> with a Data Tag that is recognised by ID, which will allow me to run a Data Merge?
    I have been told to check out some of the commercial plugins available out there, but registering and setting up demo's would require me to contact our IT provider for each, and that would be an exhaustive process.
    Any help is much appreciated.

    Hi,
    is modyfied
    Array.prototype.find = function (string) {
        for (var s = 0; s < this.length; s++)
            if (this[s] == string) return s;
            return -1;
    var mFrames, mFile, mDoc, mFields, mFieldsNames, mStory,
         mPlainTxt, mNameToCompare, mField_ID;
    // edit this with proper .csv path
    mFile = File(Folder.myDocuments + "/" + "Merge.csv");
    mDoc = app.activeDocument;
    mDoc.dataMergeProperties.selectDataSource(mFile);
    mFields = mDoc.dataMergeProperties.dataMergeFields;
    mFieldsNames = mFields.everyItem().fieldName;
    mFrames = mDoc.textFrames.everyItem().getElements();
    for (var i = 0; i < mFrames.length; i ++) {
        if (!mFrames[i].name.match(/TF\d*$/) ) continue;
        // script assumes a targered text boxes are named like: TF1, TF2...
         // (TF plus any integer) or just TF (no integer)
        // - they could have the same name
        // any other name exludes frame from this loop
        mStory = mFrames[i].parentStory;
        app.findGrepPreferences = null;
        app.findGrepPreferences.findWhat = "<<.+?>>";
        mPlainTxt = mStory.findGrep(true);
        for (var k = 0; k < mPlainTxt.length; k++) {
            mNameToCompare = mPlainTxt[k].contents.slice(2,-2);
            mField_ID = mFieldsNames.find(mNameToCompare);
            if (mField_ID > -1) {
                  mField = mFields[mField_ID];
                mDoc.dataMergeTextPlaceholders.add (
                    mStory,
                    mPlainTxt[k].insertionPoints[0],
                    mField
            mPlainTxt[k].remove();
    script assumes a targered text boxes are named like:
    TF1, TF2... (TF plus any integer) or just TF (no integer) -
    - they could have the same name.
    Jarek

  • JS - Save File as Field Name in the Data Merge Source File

    Hi All - I need some help...
    I'm trying to figure out the JavaScript code to save an indd file using the data merge source file field value.
    As an example...
    Let's say I have an invoice template called template.indd that is linked to invoice.txt.
    To make it easy, let's say the text file has 1 field called "invoice number" with a value of 123
    I run data merge.
    Now I want to save the merged indd file as 123.indd
    I've got everything figured out in JS except getting the source text file data into a variable to use when saving.  This one's been giving me fits for hours!
    Is this possible??
    Thanks very much

    Did you ever get this to work?

  • How to edit a data merge field in a 'header'?

    Hi All,
    I'm trying to figure out how to edit the green bar so I can replace <<Expertise>>-<<Expertise>> with a different field from my excel data source. I want to replace it with the Category field in the Data Merge box but I cannot seem to edit that green bar.
    Help! Thanks in advance,
    Mark

    Actually you were right, it was being inherited by the master page. And the 'live' page we were working on was unable to delete it. When I went to the master page, I deleted the << >> and it deleted it from the live page.
    Now when I put in the <<category>> on the master page, it shows on the live page. For some reason my data rows are not displaying multiple records to a page now (shows only 1 per page so I've got 117 pages!), but ill try to figure out what happened.
    Thanks!!

  • Extracting an image data merge field using only an indesign file and not document.dataMergeProperties.dataMergeFields

    Hi,
    I have kind of a weird requirement but I hope you guys can help out.
    I need to extract all the custom fields used in an indesign file without referencing the dataMergeProperties of a document. Sorry if this is a weird request it is just what I've been told (our system needs to not crash when people upload a variety of in design documents to generate high resolution jpg preview documents).
    I can already get all the text custom fields by looking for "<<" and ">>" in the text frames of a document but I'm having a really hard time finding the image custom fields.
    I tried looking at the rectangles for a given page but that didn't seem to help (but maybe i'm missing some there). I also tried looking at the graphics and images collection of a document but this seemed to return only graphics that are hard coded on the in design document and not the custom image fields.
    Any help would be appreciated!

    Uggg....
    Found the answer after I realized I was looking at the wrong SDK (5.0 instead of 6.0)
    I'm using the doc.hyperlinkPageItemSources property to get these images. It also looks like you can get the image data merge fields from DataMergeImagePlaceholder (but rememeber I couldn't access this).

Maybe you are looking for

  • Explode document distribution list / organisational unit

    I have configured document distribution. I am able to send mails through document distribution. However, I want to send mail to a group of users. Hence I have created an organisational unit with different positions and I have captured the e-mail addr

  • What does a folder with alternating ? and finder icons mean?

    After booting my G5, it now goes to a blue screen containing a solitary folder in the center with alternating "?" and "finder" icons in the center of it. They flash for approximately 22 times, stop on the "finder" icon briefly, then start up again. I

  • How to define a standard value for a table field

    Hi All, I have a date field in a database table, for that while maintaining if we don't give any value it should get the present date.  How can we do this. Thanks, bsv.

  • Feature Phones

    Not everyone in the Verizon network can afford to have Smartphones or aren't interested in this.  Seems like the focus lately is on smartphones and upgrading $15 or $30 and if you have a grandfathered VCast Video plan, you have to pay an extra $15. 

  • I REALLY NEED HELP WITH MY CURVE 9300'S WIFI!

    HI ! i have a blackberry curve 9300, OS5. I got it secondhand. It worked really great, but the problem started when I've done that thing within the host routing table. Though my wifi is connected, I can't use the internet. whenever I tried the BB bro