CS4: can I apply logic based on data merge?

Hello all,
I'm creating an InDesign document using CS4 that has variable text in it.  Some of that variable text is "static", in that it's inserted directly from a data merge.  In other cases, though, I'd like to display one block of text (I'd specify) if an element in the data merge had one value and another block of text if the data merge element had a different value.  Can I do that with a script?  Here's an example: in the data merge file I have a "WorkingHours" element.  It can have a value of either "8-5" or "24x7".  If the value is "8-5" I want to display "8 a.m. - 5 p.m. Monday - Friday" and if the value is "24x7" I want to display "24 hours, 7 days a week".  I want the text to display in a cell in a table in my document.
If I can do this, do I just create the script, save it, then select it via the data merge panel to insert it in the cell where I want the output data to be displayed?
Thanks a lot,
Ed

EdwinJaquaAtWork wrote:
Hello all,
I'm creating an InDesign document using CS4 that has variable text in it.  Some of that variable text is "static", in that it's inserted directly from a data merge.  In other cases, though, I'd like to display one block of text (I'd specify) if an element in the data merge had one value and another block of text if the data merge element had a different value.  Can I do that with a script?  Here's an example: in the data merge file I have a "WorkingHours" element.  It can have a value of either "8-5" or "24x7".  If the value is "8-5" I want to display "8 a.m. - 5 p.m. Monday - Friday" and if the value is "24x7" I want to display "24 hours, 7 days a week".  I want the text to display in a cell in a table in my document.
If I can do this, do I just create the script, save it, then select it via the data merge panel to insert it in the cell where I want the output data to be displayed?
Thanks a lot,
Ed
Hi, Ed:
It's probably more conventional to perform this kind of logic when creating the source material for the merge, However, if the text items "8-5" and "24x7" will always require the exact substitution that you describe, you can probably create a GREP paragraph style for the cells that expect the content that needs substitution. I'm not a GREPper, but perhaps a GREP guru on this forum will suggest the proper notation to make it happen...automatically, of course. The GREP action will ignore any paragraph that lacks the exact item to be substituted.
HTH
Regards,
Peter
Peter Gold
KnowHow ProServices

Similar Messages

  • Logic based on Date on Selection-Screen

    Dear friends,
    I've been writing a report in which I have the date field on selection-screen. By default I have been displaying the system date on the selection-screen.
    The reqiurement is that the user cannot execute the code for a date in past (less than the system date) or cannot give a date less than the sytem date
    but can execute the same for a date in future (greater than the system date).
    Can any one give me the logic for the same.
    Regards,
    Alok.

    Hi
    This is the code for u.
    PARAMETERS : P_DATE TYPE SY-DATUM .
    INITIALIZATION.
      MOVE SY-DATUM TO P_dATE.
    AT SELECTION-SCREEN ON P_DATE.
       IF P_DATE < SY-DATUM.
                  MESSAGE 'Entered date cannot be in Past' Type 'E'.
    **Raise any message that u created otherwise 
       ENDIF.
    <b>Reward if Helpful</b>

  • How can I do a multiple record data merge, but specify that a specific text frame with variable data only merges on the first record?

    I'm doing a multiple record data merge, I have 2 frames both with variable data placed inside.
    I would like to specify that one of the text frames only merges once(first record) and the other frame multiple times for each record in the data file.
    Is it possible?
    I thought that perhaps if I place the text frame that must merge once on the master page, it would work.  But you are not allowed to place variable text on the master and on the document page.
    I'm going to try it through scripting next, but thought that perhaps there is an easier way that I'm not aware of.
    Thanks,
    Suzanne

    Suzanne,
    If you were trying to post a screen shot, you would need to return to the forum and post it using the "camera" icon at the top of the post editing windows.
    I use a plug-in from Em Software called InData. One of the benefits for what I do is there are no individual frames on a page to deal with post-merge. Individual frames are great for simple merges (address labels, post cards, etc.). But I typically do more other types of merges.
    That said, there is a drawback--one needs to come to an understanding of writing expressions that actually parse the incoming data. So in the spice price list example, that looks like:
    It's reasonably easy once one does it a few times. And it can be far more complicated. The above is from Em Software's samples that has been tweaked. The best thing I can recommend would be to download the trial and see for yourself. They are good at responding to specific questions if you get stumped.
    I imagine this all could be scripted somehow in ID. But I have no idea how and the plug-in just lets me keep working.
    Mike

  • Can I set alarms based on data collected in a FormsCentral calendar field?

    For example, if one of my fields is "CPR certification due date" and the data entered is 5/5/18, can I get an alarm on that day saying I am due for CPR certification?

    FormsCentral is a forms-publishing and response-collecting system. Once you have the data, you could import it into a database and then have the database generate actions based on particular reports you run, but there is no such functionality in FormsCentral.

  • How to group data based on date

    In my program the internal table is returning several values based on date.
    for example for the first pernr in the image below  there are four records. i need to delete the first record which is between the dates 20 and 30 .
    and also i need to get the difference between the dates as the record 23 and 28  i need to get separate dates as 24, 25..28.

    I am not sure if I understood your question correctly.
    From what I have understood, you can use the following logic.
    This logic will move all the records from lt_fields2 to another table lt_fields1 with begda between 20 and 30 of any month, except for the first record. It will also move records for every date between begda and endda of each record.
    You can alter the logic based on your exact requirement.
    declare another table lt_fields1 like lt_fields2.
    data del_flag.
    data prev_month(2) type c.
    sort lt_fields by pernr begda.
    clear del_flag.
    loop at lt_fields2 into wa_fields where begda+6(2) GE 20.
    * Delete the first record having date greater than 20 in a month for each pernr.
       at new pernr.
            clear del_flag.
       endat.
       if begda+4(2) NE prev_month.
           clear del_flag.
      endif.         
        if del_flag is initial. 
            del_flag = 'X'.
            continue.  " This record will not be moved to the final internal table.
       endif.
    * Add records for each date between begda and endda.
       append wa_fields to lt_fields1.
       prev_month = begda+4(2)
       while wa_fields-begda LT wa_fields-endda.
             wa_fields-begda = wa_fields-begda+1.
             append wa_fields to lt_fields1.
       endwhile.
    endloop.

  • How to set a default value for a drop down list box and then apply cascading based on the default value in Infopath 2010.

    Hello Everyone
    I have two drop downs. Both are coming from look up fields from two lists. i want to set a default value(first list item) for the first drop down list box and then apply cascading based on the default value for the next drop down list box. I found one article(http://www.bizsupportonline.net/infopath2010/display-first-item-drop-down-list-box-infopath-2010.htm)
    where in i can set a default value but i can't apply cascading based on that default value. Any suggestions would be highly appreciated.
    Thanks
    Ramanjulu Naidu N

    Hey Ramanjulu,
    Take a look at the below article which I believe will answer your question.
    http://basquang.wordpress.com/2010/03/29/cascading-drop-down-list-in-sharepoint-2010-using-infopath-2010/
    Daniel Christian (MCTS)

  • Can't apply custom channel strip icons in MS v2.2.2??

    Hi all.  I've been adding and using custom channel strip icons (in addition to patch icons) in MainStage for a couple of years now but have only just noticed that I can't apply custom channel strip icons in MS v2.2.2....for some reason I can only apply Logic's default icons for channel strips in v2.2.2.  When I try to apply a custom icon to a channel strip, the icon region is blank.  However, I have no problems applying custom icons to patches.
    I've never had an issue with this in v2.1.x.
    Is anyone else able to apply custom icons to channel strips in MS v2.2.2?
    Cheers
    Gary

    CCT, I worked it out.  For starters, you should be able to get custom Channel Strip icons working in MS v2.1.3 if you put the icons here: user\Library\Application Support\Logic\Images.  My installation directory is the root Library but I've realized in the past days that others' installation directory is their user library.  This seems to be the reason why custom Channel Strip icons don't work if placed in the root Library for those users.
    For MS v2.2.2, the icons need to be placed in the MS app itself i.e. Show Package Contents: \Contents\Resources\Images.  Don't ask me why but they appear correctly when placed there. I wouldn't be surprised that this situation is a bug that was overlooked by Apple when they developed v2.2.x
    I have both versions of MS on my system and in v2.2.2, my icons are duplicated because they're in the v2.2.2 app as well as ~\Library\Application Support\Logic\Images.  However, only those icons located in the v2.2.2 app actually work.

  • InDesign Data Merge - Data Grouping or Page Breaks

    I'm working on a plant catalog for a landscaper. I want to group the plants in the catalog by their plant type (i.e. Groundcovers, Trees, Shrubs, etc). Each plant name in the data source is assigned a plant type and I've sorted the data so the plant types are grouped together. I'm successfully using data merge to create a document with multiple records and I want to use the "Plant Type" as a header per group of plants that match that type. I'd be very happy if I could also create a page break between plant types. Is there a way to accomplish this with InDesign? I can accomplish this with Word's data merge but I'd much rather use InDesign.
    Additionally, I'm currently using a text variable at the top of the page and thought this would be the solution to my problem but I'm only able to set this up using the "First on Page" option. This doesn't work well because I frequently have items at the bottom of the page that aren't in the same category as the first item on the page. I'm basically running a merge for every plant type then putting the separate documents together in a PDF... its a little time consuming but not impossible.
    I hope I've explained my situation clearly. Any guidance will be appreciated.

    Data Merge is very primitive. It doesn't do anything but put unlinked frames with data on the page.
    That said, there are scripts, such as the text liner at Rorohiko.com that will link the frames in logical sequence, and paragraph styles can be set to start on next page, or you can add anther field to the data file and put a symbol or text sting into it only where you want a page break, then do a find change and repalce with the break after the merge.
    Are you doing a lot of this? There are catlog pugins which might make your life a lot easier, but they're pricey.

  • QR Data Merge - colour change

    I'm using the new QR data merge function but I need the QR codes to be blue not black.
    I have contacted Adobe and their useless suggestion was to use the "edit QR code" menu option.
    This isn't ideal for several thousand posters. It seems like a pretty obvious requirement, I hope they fix this oversight soon.
    Does everyone have ideas about how I can change the colour change to the QR codes in bulk?

    Create 1 QR code and recolour it.
    Save it as an object style.
    Then apply it to the data merge area for the QR code.
    Hope that works - I've never tried it, just an idea off the top of my head.

  • 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.

  • CS3/OSX 10.5 - data merge directly to PDF

    g'day there
    i'll ask this question anyway despite expecting the answer "no, use CS5".
    in InDesign CS3, when using the data merge feature, is there any way to export the merged data directly to PDF like one would in CS4/CS5, as opposed to merging to a new indesign file and making the PDF from there? i use CS3/CS4/CS5 in my workplace and export data merges directly to PDF when using CS4/CS5, but the machine that i am on 90% of the time has CS3 and my workload has an increasing amount of VDP art which is not just in the hundreds of results, but in the tens of thousands.
    to me, the obvious answer is of course to swap machines, install CS4/CS5 on my machine, give the artwork to another operator who has CS4/CS5... but for the sake of this post imagine that these solutions could not be used.
    in my situation, i'd imagine that this answer would either lie in a scripted solution or a third party plug-in such as XMPie. Maybe the solution lies outside of indesign and with VDP software which may be available on the EFI Fiery RIP maybe?
    any ideas, or should i plead my case to management to pony up the cash for an upgrade? I figure whatever answer there is, money will have to change hands at some point.

    Tell management they're going to pay one way or the other.
    Bob

  • Conditional logic in Spry based on date?

    I have a list of links with expiration dates. All the links
    have expiration dates. If the link is expired, I still need to show
    it, but simply reformat the link so that it's just text, and grayed
    out.
    I have the date coming in XML in the format "mm/dd/yyyy". I
    also have a javascript function that gives me today's date in
    "mm/dd/yyyy", but I can't figure out any way to get the dates
    compared. Basically, I need something like, somewhere:
    "If expireDate =< todaysDate, then change the link style"
    As of right now, I've written a function that brings in the
    formatted date and does a document.write to write the Spry code,
    where I'm inserting the javascript date into a spry:if. However,
    that's not going to get me there as it's just comparing strings and
    not really dates. I need to find a way get Javascript (todays date)
    and Spry (date field from XML) to talk to one another (compare
    dates) and then decide what to do (change or not change link) and
    am stumped.
    I can't think how filtering the data will get me anywhere,
    since all the dates in the record set need to show up in one format
    or another. So it seems the logic for date comparison has to happen
    in Spry, but Spry appears unable to do this kind of logic. This
    lead me to writing a function, but then again how to get the Spry
    data and Javascript logic to converse....help!

    Hi,
    You can apply PPR on salary field. Then catch the event and based on condition, set the value of commission field.
    Also, you can check this link for PPR:
    http://sushantsharmaa.blogspot.in/2012/12/11-ppr-partial-page-rendering-in-oaf.html
    --Sushant

  • MDX calculation based on date logic for the Jan 1 of current year through the 15th of the previous month

    Hello, 
    We need some help with an SSAS MDX query based on date logic. One of the problems is that I don't have access to the Cube but have been given a query example with the logic needed for the calculation. Here's the scenario; 
    The ETL process will run on the first Tuesday after the 15<sup>th</sup> of a given month. The Analysis Cube data queried should include the current year up to the end of the previous month. For example, on May 19<sup>th</sup>
    (the first Tuesday on or after the 15th) the query should include data from January 1<sup>st</sup> through April 30<sup>th</sup>.
    The 15<sup>th</sup> of the month is not part of the query, it is a factor in when the query is run. The query will always be in terms of complete months.
    SELECT
                    NON EMPTY { [Measures].[Revenue Amount],
                    [Measures].[Utilization],
                    [Measures].[AVG Revenue Rate],
                    [Measures].[Actual Hours] }
    ON
                    COLUMNS,
                    NON EMPTY { ([dimConsultant].[User Id TT].[User Id TT].ALLMEMBERS * [dimConsultant].[Full Name].[Full Name].ALLMEMBERS * [dimConsultant].[Employee
    Type].[Employee Type].ALLMEMBERS ) } DIMENSION PROPERTIES MEMBER_CAPTION,
                    MEMBER_UNIQUE_NAME
    ON
                    ROWS
    FROM
                    ( SELECT
    ( { [dimDate].[Week Date].[1/4/2015], [dimDate].[Week Date].[1/11/2015], [dimDate].[Week Date].[1/18/2015], [dimDate].[Week Date].[1/25/2015], [dimDate].[Week Date].[2/1/2015] } )
                    ON
                                    COLUMNS
                    FROM
                                    ( SELECT
    ( { [dimIsBillable].[Is Billable].&[True] } )
                                    ON
    COLUMNS
                                    FROM
    [SSASRBA]
    WHERE
                    ( [dimIsBillable].[Is Billable].&[True], [dimDate].[Week Date].CurrentMember ) CELL PROPERTIES VALUE,
                    BACK_COLOR,
                    FORE_COLOR,
                    FORMATTED_VALUE,
                    FORMAT_STRING,
                    FONT_NAME,
                    FONT_SIZE,
                    FONT_FLAGS

    Hi Hans,
    Thank you for your question.  
    I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated.  
    Thank you for your understanding and support. 
    Regards,
    Simon Hou
    TechNet Community Support

  • Refer to Doc ID 825030 which talks about applying of patch for correction of date format in web adi. Is this patch can be applied on R12.1.3 instance as this patch released date is very old. Please suggest if there is another patch which be applied to cor

    Refer to Doc ID 825030 which talks about applying of patch for correction of date format in web adi. Is this patch can be applied on R12.1.3 instance as this patch released date is very old. Please suggest if there is another patch which be applied to correct the date format in web adi. currently the date is coming in number format.

    Hello,
    This document is for 11i Date Format Changes When Loaded Into Webadi (Doc ID 825030.1)
    use this document instead for R12 : Incorrect Date Format in Excel Sheet Generated Via WebADI (Doc ID 828253.1)
    <Moderator Edit - deleted MOS Doc content - pl do NOT post such content>
    Best Regards,
    Eric.

  • Can we apply attribute change run for datatarget (Master data )

    hi,
    can we apply attribute change run for datatarget like masterdata where for example i am loading 0pm_order_attr to 0pm_order data target (master data). after successful loading of data, do i have to apply attribute change run for <i>info object</i> 0pm_order or apply attribute change run for 0pm_order in <i>info providers</i> because after successful loading of pm order data, i am trying to load transactional data and it is showing error "No SID value found for xxx record"
    pls advice how not to make the error repeat even after successful loading of master data.
    Thanks in advance, quick responce is greatly appreciated.

    Hi all,
    i am in production server and cannot activate the master data 0pm_order which is in info providers directly, is there any chance of activating it with any other option.
    coming to attribute change run, i understand that we can apply for master data objects which are there in info providers, am i correct?
    i ran attribute change run yesterday for the info object 0pm_order but even after doing that i tried to load transactional data but it was failure with the same error "No SID value found", why i am getting when i found master data loading successful and ran attribute change run for infoobject.

Maybe you are looking for

  • Can I share my ibook library  with my wifes Air Book?

    I would like to share my iBooks with my wife's Air Book. Is this possible? If so, how do I go about it. Thanks RBD

  • JDBC to Idoc scenario - change of logical system name

    Hi, I have a JDBC to idoc scenario that worked. Now i had to change the logical system name from my sender system from ABC_123 into ABC123 in the SLD (Business System - Integration - Logical System name). I did so and also refreshed my Cache. Afterwa

  • Issue with Select Query in the Delivery userexit USEREXIT_SAVE_DOCUMENT

    Hi All, I am facing a strang issue with delivery userexit 1) I have a delivery user exit MV50AFZ1 - USEREXIT_SAVE_DOCUMENT. 2) In this user exit. I have written a select query as shown below *Get the already delivered data     SELECT vbeln           

  • Paying for Skype Premium using a Purchase Order/In...

    Hi, Our University would like to pay for a Skype Premium account using a Purchase Order system - i.e. we send out a Purchase Order to Skype, Skype sends an invoice, and we then send payment to Skype. Would this be possible, or is there an email addre

  • WRT54G3G-ST has problems with Pantech PX-500

    Hello All and Linksys Support (I hope), I just got this WRT54G3G-ST and when I insert the PX-500 PRIOR to power up... the WRT54G3G-ST will not complete it's bootup process. If I insert the PX-500 AFTER power up... the WRT54G3G-ST may or may not see t