Power Apps

Power Apps Find and Replace: Refactor Canvas Apps Safely

Use Power Apps formula-level Find and Replace and the app-wide Search pane without turning a quick rename into a broken canvas app.

Power Apps has two related tools. The Search pane finds references across the canvas app. Find and Replace in the formula bar changes text within the currently selected formula. They are useful together, but formula-level replacement is not a safe app-wide symbol rename.

Microsoft documents the current formula-bar feature in Use Find and Replace in the formula bar and the wider discovery tool in Use the Search pane.

Search the whole app first

Open Search in Power Apps Studio and search for the control, variable, collection, data source or text you intend to change. Review every result before editing.

A term such as Status may appear as:

  • a SharePoint or Dataverse field
  • a control name
  • text shown to users
  • part of another identifier
  • a string passed to a flow

Those matches do not necessarily mean the same thing. App-wide search helps you map the impact; it does not decide which occurrences should change.

Use formula-level Find and Replace

Select the control and property containing the formula, place focus in the formula bar, then open Find and Replace using the documented command or shortcut. Browser and operating-system shortcuts can differ, so use Studio's formula-bar menu if the key combination is intercepted.

Choose the available case and whole-word options deliberately. Replace one occurrence first, confirm the formula still parses, then proceed. Replace all affects the selected formula, not every formula in the app.

Safe example: changing a local variable

Suppose a button contains:

Set(varBusy, true);
IfError(
    SubmitForm(frmRequest),
    Notify("Save failed", NotificationType.Error)
);
Set(varBusy, false)

Replacing varBusy with varSaving inside that formula is straightforward. It is not complete until app-wide Search confirms every other use has also been considered.

Use App checker after the change. An unresolved name is easy to spot, but a replacement that produces another valid name can be logically wrong without generating a formula error.

Data-source and field renames need more care

Do not treat text replacement as a schema migration. SharePoint columns have internal names, Dataverse columns have logical names, and connectors can cache metadata. Renaming visible text in a formula does not rename the source field.

For a data-source change:

  1. Record the old display and internal or logical names.
  2. Make the source change through its supported administration route.
  3. Refresh the data source in Power Apps.
  4. Review generated cards and formulas.
  5. Search for both old and new names.
  6. Test each create, read, update and delete path.

Do not bulk-replace these blindly

  • short common words such as ID, Value or Name
  • URL fragments, environment names or connection identifiers
  • user-facing text that is also used as a stored status value
  • Power Fx function names
  • a variable whose replacement is already used for another purpose

String literals are especially risky. Changing the displayed label Approved may also change the exact Choice value sent to SharePoint.

Verify the refactor

After replacement:

  • run App checker
  • search again for the old term
  • inspect every changed formula in source control or the app's version history
  • test with each relevant user role
  • use Monitor for connector and data errors
  • test delegation-sensitive screens with enough data to expose omissions

Save a version before a large refactor. If the app is solution-aware, move the change through the normal development, test and production route rather than editing production directly.

Find and Replace proves that text changed. Only the follow-up checks establish that the app still behaves correctly.

For more practical refactoring patterns with the test boundary made explicit, join the Power Apps Builders Space.

Sources