Skip to Main Content
Feature Request FR-2735
Product Area Application Builder
Status CLOSED

66 Voters

introduce search and replace for developers

phillip.grimshaw Internal
· Sep 8 2022

Idea Summary
Apex seems to the only modern developer environment without a search and replace functionality.

Use Case
As a developer when and global or item or database column changes I want to be able to search and replace the app/workspace to ensure all refs to this item are updated.

Preferred Solution (Optional)
Please just make search and replace work.

Comments

Comments

  • bshumway OP 2.8 years ago

    Fascinating idea… 

    The search-and-replace would have to be a wizard (multiple steps). The reason it can't be as simple as a click of the button is that APEX components have unique ID's and unique names. For example… you can't have two buttons on the same APEX page with the same name. Also… if a component gets renamed… all references to that component should be updated (I think perhaps since they are pointing to the ID and not the name, this happens automatically?).

    Another thing is what happens with table names. If you replace a table name in an SQL query, what happens to the columns?

    At the very least there should be some kind of ‘preview’ before you commit your changes.

    So maybe something like… You search the APEX application for all references to “HOT_DOG”… you replace it with “SAUSAGE”… it shows you all of the places in the app where hot_dog gets replaced with sausage… it shows you any ‘error’ messages where the replace cannot occur (a button for example already exists with the name sausage on a particular page). And it gives you a warning message next to any place where certain components will get “reset”… e.g. a column in an IR will be renamed so it will lose its attributes (meaning you may have to have to set its attributes again). Or in the case of renaming a table, it should convey all of the columns that are about to disappear. So you're aware of the impact of your change.

    There should also be a checkbox next to each preview so you can uncheck it if you want… say for example you want to keep the HelpText the same for a few different page items, but you do want to change the name of the page items.

    OK, so it's not as simple as ‘find-and-replace’ as you would for a text file.

    This doesn't mean we should give up!

    I think this would be a super handy tool. The number of times I've had to do a mass-replace in an APEX app… and I find myself clicking through each case, applying the change, clicking to the next place etc.… shows how much a search-and-replace feature would be a great time saver.

    So a well-thought-out replacement wizard-workflow would be awesome!

  • phillip.grimshaw OP 2.8 years ago

    Thanks for such good suggestions. A great write up.

  • j.sieben OP 2.7 years ago

    Let me tell you honestly that in such cases we even export the app, replace everything there with a simple text editor and import the app back in. So I agree, a good replacement would be more than welcome.

  • vincent morneau Admin OP 2 years ago

    The APEX team discussed this idea earlier. While it sounds like a timesaver, we think it could lead to more problems down the road by replacing unwanted references.

    Especially because APEX PL/SQL code blocks are compiled and validated, this batch search and replace would bypass server side checks and potentially introduce compilation errors in processes, computations, validations, etc.

    When the YAML/JSON feature evolves to a point where APEX can import the files, it will make search and replace easier by doing it directly at the file system level using a code editor.

  • gabriel.diaz.arias OP 2 years ago

    That's interesting. Any news about git integration and CI/CD?. Very looking forward to this in the roadmap:

    • Plan for improved integration with cloud-based and on-prem source code control and CI/CD pipeline automation, including support for artifacts, build pipelines, GIT, etc.
  • vincent morneau Admin OP 2 years ago

    Hi @gabriel.diaz.arias , first of all congrats on having two of your ideas win the Kscope23 ideation session. Exciting stuff!

    About CI/CD, you can rest assured that we will spread the news when we have something to share. We know how important CI/CD is to customers.

  • gabriel.diaz.arias OP 2 years ago

    Haha nice!, I didn't watch that seession, I'll have a look.