In Progress

Show number of replacements performed

After performing a Find&Replace operation with "Replace All", I'd love to see a pop-up box with information on how many replacements were made.

MS Word does this, and it would be very helpful to have this info in Studio too.

Microsoft Word information pop-up showing 'All done. We made 15 replacements.' with an OK button.

I mentioned this idea 4 years ago on another SDL community forum and it was logged as Enhancement report LTE-296. Unfortunately, the enhancement hasn't been implemented, so I'm adding it as an idea here.

Parents
  • In answer to Alison's appeal, I've incremented the number of pleas.

    The programming structure used in a Fortran type language would perhaps contain a WHILE loop.

    The routine would take two parameters of type text: InputString:and ReplacementString, plus an exit parameter of type integer: Endcount.

    In outline, the routine would look something like this:

    ROUTINE SearchAndReplace (InputString, ReplacementString, Endcount)

    {Prompt for InputString and ReplacementString}

     PLACEMARK: Write '###'

    Counter := 0

    WHILE NOT EndOfFile DO

      SEARCH InputString;

       REPLACE WITH ReplacementString;

       Counter := Counter +1;

    ENDWHILE;

    Endcount := Counter;

    {Display Endcount}

    Write 'Number of replacements: '); Write 'Endcount'; Writeline ' replacements';

    {Search upwards for Placemark}

    ERASE Placemark;

    END Routine.

Comment
  • In answer to Alison's appeal, I've incremented the number of pleas.

    The programming structure used in a Fortran type language would perhaps contain a WHILE loop.

    The routine would take two parameters of type text: InputString:and ReplacementString, plus an exit parameter of type integer: Endcount.

    In outline, the routine would look something like this:

    ROUTINE SearchAndReplace (InputString, ReplacementString, Endcount)

    {Prompt for InputString and ReplacementString}

     PLACEMARK: Write '###'

    Counter := 0

    WHILE NOT EndOfFile DO

      SEARCH InputString;

       REPLACE WITH ReplacementString;

       Counter := Counter +1;

    ENDWHILE;

    Endcount := Counter;

    {Display Endcount}

    Write 'Number of replacements: '); Write 'Endcount'; Writeline ' replacements';

    {Search upwards for Placemark}

    ERASE Placemark;

    END Routine.

Children