Data Merge - Change Text/Cell Characteristics based on Data Value

I am working on a letter that is sent to our diabetic patients during their birthday month...the letter will contain the last known test results and date for several measures and then recommend action based on those results.
The data comes from a text file (csv file separated by "^") generated by our Electronic Medical Record (EMR) database...
What I need is a script or tool that will recognize specific text and then change the font size and cell background for that particular field...
In the first example below, everything is normal, so there is no notification necessary...
In the second example, the BP is too high (calculation is performed by our EMR), so the csv file includes "Due Now" and "Yes" for the final two columns in the table.  The script needs to recognize "Due Now," enlarge the font, change the color, and change the background color of the cell, and then recognize "Yes" and do the same.
Is this possible?  Is there a tool/script/method that I need?
Example 1
CSV File Text:     ^130/70 (3-28-2011)^Next Visit^No^
InDesign Table:
Measure
Your Goal
Your Results
Next Test?
Contact Doctor?
Blood Pressure
< 130/80
130/70 (3-28-2011)
Next Visit
No
Example 2
CSV File Text:     ^160/90 (3-28-2011)^Due Now^Yes^
InDesign Table:
Measure
Your Goal
Your Results
Next Test?
Contact Doctor?
Blood Pressure
< 130/80
160/90 (3-28-2011)
Due Now
Yes
Thanks!
B. Mark Hooten
Medical Media, Mail Room, Print Shop
O k l a h o m a  C i t y  V A M C

Mark.Hooten wrote:
I am working on a letter that is sent to our diabetic patients during their birthday month...the letter will contain the last known test results and date for several measures and then recommend action based on those results.
The data comes from a text file (csv file separated by "^") generated by our Electronic Medical Record (EMR) database...
What I need is a script or tool that will recognize specific text and then change the font size and cell background for that particular field...
In the first example below, everything is normal, so there is no notification necessary...
In the second example, the BP is too high (calculation is performed by our EMR), so the csv file includes "Due Now" and "Yes" for the final two columns in the table.  The script needs to recognize "Due Now," enlarge the font, change the color, and change the background color of the cell, and then recognize "Yes" and do the same.
Is this possible?  Is there a tool/script/method that I need?
Example 1
CSV File Text:     ^130/70 (3-28-2011)^Next Visit^No^
InDesign Table:
Measure
Your Goal
Your Results
Next Test?
Contact Doctor?
Blood Pressure
< 130/80
130/70 (3-28-2011)
Next Visit
No
Example 2
CSV File Text:     ^160/90 (3-28-2011)^Due Now^Yes^
InDesign Table:
Measure
Your Goal
Your Results
Next Test?
Contact Doctor?
Blood Pressure
< 130/80
160/90 (3-28-2011)
Due Now
Yes
Thanks!
B. Mark Hooten
Medical Media, Mail Room, Print Shop
O k l a h o m a  C i t y  V A M C
Have you considered programming the database application to perform the logic tests, combine the data with the appropriate InDesign tagged text markup, and output the result as an InDesign tagged text file in .txt format? You can then place the tagged .txt file in a new blank InDesign file.
Search Google for terms like "InDesign tagged text user guide" without quotes for the tagged text guide and related links. Export an InDesign file as tagged text to get an idea of what's involved. In fact, you can use the tagged text exported from your data merge setup as the basis for what the coded database needs to do. You need to open the tagged text file in a text editor, not in InDesign.
HTH
Regards,
Peter
Peter Gold
KnowHow ProServices

Similar Messages

  • Data merge skipping one cell

    Hello, having a problem in IDCS4 where data merge is skipping a cell in the EXCEL tab-del .txt file. i've saved both documents different ways (the txt through word, text edit, excel, etc.) done inx and save as with the id file. I'm doing business cards and its skipping one of the "titles", going into the next row - so everybody after that has the wrong title. i've tried adding a fake line or 2 with crap data to get it to reset, ive duplicated the column, but those doesnt work. theres no funky characters in that cell, i've rearranged everything and it always skips the second rows "titles" cell. saved as INX to IDCS3 and it works perfectly - using the same .txt file. any ideas? thanks in advance.
    ok done some more testing
    if i have the title seperated into another text box, it works correctly, while the other one still doesn't - everything is styled the same, and i have no options checked in the merge prefs.

    I'll hop on the obvioius guess and ask "Does that title have a comma in it?"
    When building data merge CSV files I make a textbox on the pasteboard, paste all of the data out of excel, do a find for the comma character and replace it with a word I know isn't used in my file "marklar" from south park, then replace the tabs with commas and paste that into a plain text editor, save that out as CSV. In any case I suggest when working with data merge to never use CSV as your working editing file as Excel has a tendency to format cells for no apparent reason when opening CSV. Short of having manual calculation set and knowing that everyone who touches the files also does there is room to be burned.
    Edit: Mac 2008 Excel is what I have.

  • ADF Table cell color based on the value in that field

    Dear All,
    I want to create a table for our new application which contains a table used to represent the data in a chart format or matrix format,
    and each cell of the table should be filled with a colour out of three colors, based on the value belongs to which range eg:(1-8 ->green, 9-20 - yellow etc),
    I dont know how to implement this. Please help...
    Ranjith

    Check this out.
    How to highlight ADF table row based on column value?
    -Arun

  • Change an Object property based on a value coming from the Excel sheet

    hi all
    i've been able to bind a value from the excel sheet to my my component
    but i want to change a property of an object in my component based on this value at the run time.
    during the design time, it works fine
    for example, if my value called "_xvisible"
    and i use to it to hide some object.
    if i set _xvisible during the design time in excel, it works fine in the run mode.
    but during the run mode, if the value got changed, there is no affect.
    thank you
    Amr

    Hi
    See the xcelsius samples present inside xcelsius SDK. there are examples describing how to bind data which will work at runtime also.
    Hope this helps
    Rush-me

  • In Design Data merge into separate pdf files with variable data name

    Hi all, thank you for taking the time to read this.
    Here's what I have.
    I've created a file in indesign using a 65 page document.
    With this document I've set it up to have specific data in certain areas with data merge.  I have that part setup and it works fine. 
    When I go to export PDF it creates one massive pdf document with all the variable data in it.  However here is the scenario I would like.
    1. Indesign to create a separate pdf file for each record.  So in this example it would be 100 different 65 page pdfs since it should have different pdfs for each record and there are 100 records in the csv.
    2. The pdf should be named after each variable record.  For example record one says name "Joe", record 2 name "Frank".  So it should create joe.pdf, frank.pdf etc.
    How can I accomplish this?

    I don't know if this script works in CS4 or not:
    http://indesignsecrets.com/page-exporter-utility-peu-5-script-updated-for-cs3.php

  • Change the row colors based on column values in MOSS 2007.

    Hi Team,
    I am using MOSS 2007 environment. In that I am having one SharePoint list. In that list based on column values rows colors need to change.
    Kindly help me anyone on this.
    Thanks,
    Ashok

    Hi Ashok,
    Please follow the below link:
    http://www.contentmaster.com/sharepoint-2010/conditional-formatting-of-list-views-for-sharepoint-2010-changing-the-font-colour/
    http://sharepoint.stackexchange.com/questions/7478/highlight-row-color-based-on-field-values-in-sharepoint-2010-list-view
    Best Regards,
    Brij K

  • Why do Start/Finish dates automatically change to match Actual Start/Finish dates?

    Please excuse my ignorance, but what is the
    rationale for MS Project automatically changing the "Start" and "Finish" dates to match the "Actual Start" and "Actual Finish" dates when they are inputted?  Can this "feature" be disabled?
    Thanks in advance for any assistance.

    Hi,
    In the end, yes, once actuals are recorded, all these values are the same - but before that they can all be different!
    Before an actual start is recorded, the column shows "NA" (wich obviously is different from Start :-)). To the scjheduling engine, thsi means the start can be freely calculated (from predecessors or resource leveling, f.i.) whereas when a date
    appears in Actual Start, Project will take that value as carved in granite - it is supposed to show past reality, and reality is more powerful than values calculated by the scheduling engine!
    So these two values are not Always identical!
    As for Scheduled start, that is indeed meaningless for automaticlly calculated tassk. But for manually scheduled tasks it does play a role. For a manually schduled task, you can set any start value you want (even a litteral such as "when we have
    the time"). Still, there is an option to make manually scheduled tasks obey links - the result of that calculation is then put into scheduled start - and so there can be a difference between these two columns as well.
    So, no, these 4 values do not have the same function. They are ony identical as soon as actuals are recorded but what do you expect? There is only one past reality, Project does not work with a parallel universum :-)
    Hope this helps,

  • Change text size and colour of report values ?

    Hi,
    I have a formula as part of a BEx query in version 3.5 and I'd like to make the values of this formula stand out more by either changing the text size of this one row and/or changing the colour.
    I've already selected the "highlighting" option but this only changes the colour to a light blue colour.
    Does anyone know if it's possible to change the text size and colour of one or more rows of a report?
    Thanks.

    HI Mark,
    Greetings.
    Your requirement can be met by using exceptions. It can not change/increase the text size but it can give you color coding based on the conditions you set while creating query.
    Open your query in Designer and click on exception button on the top menu bar. Define your condition on whatever key figure you want to get the color coding and execute your report.
    Let me know if this is what you were looking for.
    Thanks
    Sachin

  • Display a count of data in a single report table based on date

    Hello, I need a report that will display the name of the SOURCES, and compare the number of sources received TODAY and YESTERDAY
    My table CELLS holds the name of the SOURCE, and their SAMPLED_DATE so I need to distinguish how many I reveived today and yesterdat.
    eg.
    SOURCE|TODAY|YESTERDAY
    A | 10 |8
    B | 7 |4
    I am thinking of something like the below:
    SELECT DISTINCT source, COUNT(source) TODAY, COUNT(CASE
    WHEN sampled_date = TO_CHAR(SYSDATE-1, 'DD/MM/YY')
    THEN 1 END) YESTERDAY
    FROM cells
    WHERE sampled_date = TO_CHAR(SYSDATE, 'DD/MM/YY')
    GROUP BY.... CUBE
    Any help will be much appreciated.

    drbiloukos wrote:
    Hello, I need a report that will display the name of the SOURCES, and compare the number of sources received TODAY and YESTERDAY
    My table CELLS holds the name of the SOURCE, and their SAMPLED_DATE so I need to distinguish how many I reveived today and yesterdat.
    eg.
    SOURCE|TODAY|YESTERDAY
    A | 10 |8
    B | 7 |4
    I am thinking of something like the below:
    SELECT DISTINCT source, COUNT(source) TODAY, COUNT(CASE
    WHEN sampled_date = TO_CHAR(SYSDATE-1, 'DD/MM/YY')
    THEN 1 END) YESTERDAY
    FROM cells
    WHERE sampled_date = TO_CHAR(SYSDATE, 'DD/MM/YY')
    GROUP BY.... CUBE
    Any help will be much appreciated.Regardless of your final solution, if "sampled_date" is a character string, I'd convert it to a DATE (use TO_DATE) to compare against SYSDATE, rather than convert SYSDATE to a string for the comparison.

  • How do I generate a data merge in InDesign from an excel spreadsheet which includes a barcode

    Can you please advise if the following process is possible within InDesign CS 5.5? (Mac OS 10.8.2).
    We need to create a data merge that includes a barcode. The data merge is for several thousand records.
    We have a customer-supplied Excel spreadsheet that contains seven fields, one of which is a number that ultimately needs to print as a barcode when we make the data merge in InDesign.
    As you would expect, the conventional six fields data merge perfectly - but we can't find a way to make the barcode print correctly within the data merge.
    We have investigated several possible solutions without success.
    Some solutions suggest a plug-in for Excel to convert the number into a barcode whilst still in the spreadsheet - but this doesn't come across correctly when we import the CSV file into the InDesign data merge.
    We have investigated certain third party software applications but none provide the full solution we require. Some, for example, appear to create the barcode within the Excel spreadsheet but don't produce the barcode correctly when we data merge in InDesign; and some will allow us to create a one-off barcode within InDesign but have no automated way of retrieving the thousands of Excel numbers and turning them into barcodes.
    We have also come across possible 'font' solutions but have had no success with these either.
    For a previous job we needed to produce we outsourced to a specialist mailing company, who assured us they produced the whole job (very quickly) within InDesign. They, understandably, won't tell us how they did it. But, given the speed with which they produced the job for us, we imagine - with the correct software - the whole process is easy to do.
    Can you please advise?

    HI MIKE
    Thanks again for your reply and your help with this.
    I've downloaded the barcode font from the link you supplied.
    I've tried three tests - and seem much closer to getting what we need. But I've come up against a couple of issues.
    TEST 1 - almost just to see if the downloaded font worked, I simply data merged our source csv file and applied the downloaded barcode font to the serial number in ID. Probably unsurprisingly, this produced a perfectly printed barcode - that wouldn't scan.
    TEST 2 - I manually added asterisks before and after the serial number in the first couple of fields and then tried the same process as TEST 1. It produced a perfectly printed barcode which this time DID scan correctly - but obviously the barcode had asterisks on it which I don't want. I just want the serial number. And with thousands of serial numbers we need the addition of the asterisks to happen automatically (which is where your text editor process seems the perfect solution, if we could get that to work).
    TEST 3 - Noting your comments about using parenthesis around the serial number, I followed your example of (123456). But Excel won't let me type a parenthesis. It lets me type the parenthesis but then instantly substitutes it with a - (hyphen) before the number in the actual serial number cell and no character at all after the number.
    If you have any suggestions or solutions for any of the above they'd be gratefully received! Thanks again for all your help with this.
    Kind regards
    Rob

  • IDCS6 MACOSX JS: Data Merging many txt files one after another

    Hello everybody.
    I have a situation where I have to data-merge many text files to the one actual indesign "base" file. The formats of the databases are all the same, the point of difference is a code in the second field of the database that refers to a mailing zone (not a zip/postcode, a "distribution centre" code that has 56 or so possibilities). I would prefer to data merge one file and then somehow split the resulting PDF via Acrobat, but the length of the resulting mailing zones is inconsistent and something that can't be done though the "split document" feature in acrobat.
    The database starts out as one massive file but using a one-line  code, can be split into its mailing zones into separate text files.
    My ultimate question: is there any way to data merge more than one file at once (e.g. one after another) and give them their names based on the names of the input text file?
    Ole Kvern had a script to Data Merge one file without the UI. I have altered the last line slightly so that it outputs to a PDF based on [High Quality Setting]:
    if(app.documents.length != 0){
            var myDocument = app.activeDocument;
            app.dataMergeOptions.removeBlankLines = true;
            //Select a source file.
            var myDataFile = File.openDialog("Select a data file")
            var exported = "file location(redacted for the sake of this post)"
            if(myDataFile != ""){
                    myDocument.dataMergeProperties.selectDataSource(myDataFile,);
                    myDocument.dataMergeProperties.exportFile(exported,"[High Quality Print]",);
    I figure the answer has to do with the variable "myDataFile" and rather than being simply open a dialog, it would be somehow selecting an array of text files, but this is where I am out of my depth.
    Any insights or other thoughts that may not involve trying to do many merges at once but may somehow revolve around one large merged PDF?
    Many thanks
    Colin

    I've answered my own question, but the answer lies outside of Adobe InDesign – it uses bookmarks within Adobe Acrobat.
    1) Data Merge the art/data to one large PDF file.
    2) In the resulting PDF file, manually search out the mailing zones and apply bookmarks to each first instance only of each mailing zone. In this case, it is a manual process of find/replace to find one of 70 possible mailing zones that may be used in any database. Each bookmark should be named with its respective code. It is a manual process, but it would take 5 minutes so this is acceptable.
    3) Using "Split Document" from the pages panel, make sure the "top level bookmarks" radio button is checked, and in the Output Options make sure that the "Use bookmark names for files" radio button is checked.
    I'm aware that this was a rather obscure question that only a fraction of users on this forum may wish to know an answer for, but hopefully this workaround helps someone else in a similar situation.
    Colin

  • Speeding up Data Merge

    My company has really embraced the variable data craze, with one problem. It takes far too long. I've been primarily using InDesign's Data Merge function, but I routinely get system lockups and InD crashes even when merged the simplest of documents. I often find myself having to split the file into several small (less than 1000, or sometimes, less than 500) pieces in order to get the merge to complete. This is a huge ordeal when dealing with lists over 10,000.
    These haven't been very complex documents, for the most part; usually some text and a graphic or two, like a signature or a PDF form.
    However, we've done one very complex merge, a very nice peice with lots of color, and it took - and this is no exaggeration - over 30 hours to complete the PDF export.
    There's got to be a better way, doesn't there? Will throwing RAM and/or new processors at the problem help much? I'm running CS3 on a G5 with 1GB RAM (yeah, I know, but I don't control the purse strings).

    I've found a neat method to avoid this kind of InDesign bulkiness. Basically, you can use the Watermark feature of Acrobat 8 to take a PDF of only the variable data, on otherwise blank pages, and add the PDF of the static text as a watermark background on every page.
    You can even nudge the watermark image around until the variable and static areas match up precisely, then apply it to all pages (or a subset, or odd/even pages only, etc.)
    I use InDesign's Data Merge and Text Variables for some complex labels that are driven by a spreadsheet, and it's been sometimes unreliable. The Acrobat watermark feature can go a long way to making it more reliable I think.
    Darryl

  • Data Merge Not Displaying Images

    This is my first go using Data Merge and so far so good. I have my master template set up and have successfully merged data from my csv file into a multi-page data merge document.
    For reference I am using ID CC and Windows 7
    My problem is data merging images.
    My csv is set up using '@image as a header, and I am using a relative link in the below field (/image-folder/image.jpg)
    ID recognises the image header and shows 'image' in the data source, but when I assign it to my frame nothing is displayed. I have the fitting set to fit the frame.
    My path seems to be correct, as if I change it, my image does not appear in the layer palette.
    I am not seeing the image when I hit 'preview' in the data merge palette, or when I perform the data merge itself.
    Really in need of some help!

    Try creating a new blank document containing a single graphics frame. Drag the 'image' entry from the Data Merge panel on to the frame. It should now show <<image>> within the frame (see screenshot). See if data merge works now.
    If not, another thing to check is the separators in the file path in your csv file. To get the correct path, place a test image then go to the flyout menu in the Links panel and select Copy Info > Copy Platform Style Path.

  • Data merge crash in ID CS6 server (but works in ID CS6 desktop)

    I have a strange problem with datamerge solution of InDesign cs6 server.
    There is a 20-page indd document and a 50-record csv file to be used along with it.
    Creating merged document (using data merge) causes ID CS6 server to crash right after the moment the following line executes:
    objDoc.mergeRecords();
    However, strangely, for the same template file there is no crash in InDesign desktop counterpart.
    I certainly seems that there is some inherent problem with data merge in the InDesign server. All data merge settings are same for both applications.
    Even there is no crash if I directly export to PDF as follows:
    objDoc.dataMergeProperties.exportFile(ExportFormat.PDF_TYPE, outputfile);
    So, in summary for the same template file:
    objDoc.mergeRecords(); // crash occurs in InDesign server but not in desktop counterpart
    objDoc.dataMergeProperties.exportFile(...); // no crash at all
    It would be a great help if someone can throw some light on this.

    This is two separate issues. The highlighting is a behavior change and not for the better inthe opinion of many, but nothing you can do about it at the moment.
    Links, on the other hand, have ALWAYS been absolute, as long as ID can find them in the path stored in the file. Even if you copy a links folder from the server to the local machine, ID is going to ignore it and use the links on the server as long as they are there and you have a connection.

  • Data merge issues in InDesign CS4

    Hello
    I'm having an issue with a data merge document that I've made. The issue  I'm having is when ever I "update content in data fields" items are  deleted off of the page. I have rebuilt it several times but always get  the same issue, any ideas?
    Cheers
    Jack

    That's a feature I have not used, but could not replicate.
    It seems for that feature, you have set up a merge doc with the fields on the Master Page? (preferred method) and created the merged document, edited the data source, gone to the Data Merge Panel and selected Update Content in Data Fields? That generated a log of updated records on my machine with the new data.
    More info needed on your process.

Maybe you are looking for

  • Screen won't dim w/ Intel KMS [SOLVED]

    I have a rather obscure Gateway T-series laptop, with an Intel 965 chip. To get backlight working I had to use acpi_backlight=vendor in Grub, but if KMS is on I can't dim anymore, either with the keys or xbacklight. The keys have no effect, and xback

  • HT1338 I dont have icloud as an icon in my system preferences, how can I find it or add it?

    I dont have icloud as an icon in my system preferences, how can I find it or add it?

  • Xpath 1

    Given a response like this :   <?xml version="1.0" encoding="utf-8" ?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Bod

  • Dynamically get Credentials from CSF map

    Hi, I'm trying to call CSF map from Webservices to get OIM credentails (xelsysadm userID and password) dynamically. The below piece of code I have used to get values fro CSF. But when I'm trying to deploy the application on weblogic server, I'm getti

  • Connector to a Non SES web service

    Could someone briefly describe how to go about this task? I need to create a connector to a webservice and show federated source's search results in-line in SES. Thanks so much for any insight.