5 Replies Latest reply on Jun 17, 2014 8:37 AM by BradRE

    Data Merge Live GREP Find/Change

    BradRE

      Is it possible to Find/Change on a string of text with GREP without user interaction (i.e. without the manual Find Change Dialog and/or Javascript). It seems while defining a Paragraph Style that the "GREP Style" will only find a regex string and change format but not find and replace by the character.

      Reason is that we're in a data merge heavy workflow, scripting is on our back end and is normally out of reach, manual interaction is intended to be minimal at most. I would like to identify a way to i.e. replace a string, or eliminate double paragraph returns live in a template after the file has been generated.

       

      Any thoughts or suggestions?

      Thanks so much!

      Brett

        • 1. Re: Data Merge Live GREP Find/Change
          Eugene Tyson Adobe Community Professional & MVP

          Set up your GREP search once

           

          Then in the Keyboard Shortcuts (Edit>Keyboard Shortcuts)

           

          You can assign a key command to find and replace - be careful not overwrite another keyboard shortcut

           

           

          Find.png

          • 2. Re: Data Merge Live GREP Find/Change
            BradRE Level 1

            Thanks for replying! Yet, I'm mostly inquiring about doing this with zero user interaction. So if a customer enters "door", the Indesign template can replace it with "window". Prior to the operators opening and printing the document (zero interaction on their part). We do use Javascript on our back-end, although if I replaced i.e. two paragraph returns with one, it would miss-align our merge (we use script-labels (Link1, Link2, etc.) rather than XML Data Fields. The closest I can find is the "GREP Style" in Paragraph Styles, but rather than "Apply Style" "To Text" ...instead using a find/replace query live in the document.

             

            Thanks again!

            • 3. Re: Data Merge Live GREP Find/Change
              Eugene Tyson Adobe Community Professional & MVP

              Yeh I don't think you can do that.

               

              But with Data Merge you have the option to remove blank lines

              Untitled-1.png

               

              I don't know about automatically replacing words without user interaction though...

               

              How would that work, you could have for example

               

              "The Doors walked in the doors" - and it would change to - "The Windows walked in the windows"

              • 4. Re: Data Merge Live GREP Find/Change
                SJRiegel Adobe Community Professional & MVP

                This seems like an odd request.

                So if a customer enters "door", the Indesign template can replace it with "window". Prior to the operators opening and printing the document (zero interaction on their part).

                Can you just not trust your operators to run some standard "search-and-replace" routines before proceeding?

                • 5. Re: Data Merge Live GREP Find/Change
                  BradRE Level 1

                  We could... but, it would be a first and I'd rather the files be opened in an export ready state (as they currently are). If a routine was accidentally skipped once, it would have the potential to cost a lot of money. This is a long standing workflow using a Javascript, parsing the cells of a .csv file. (thus why replacing a double return with a single return would miss-align the entries) and the "Data Merge" removing of blank lines is not available since it's not set up using that process. XML and tags would be the modern/flexible way to go, yet that's a different department, yuck... and I'm to use the data as supplied.