Rename controls in canvas apps with Copilot (preview)
[This article is prerelease documentation and is subject to change.]
Canvas apps often contain numerous controls, so it's important to name them meaningfully for better maintenance and collaboration. With the new Proactive control rename feature, Copilot assists by suggesting appropriate names for controls. Makers can review the suggestions and apply the changes to multiple controls at once. When a control’s name is updated, the change is reflected across all its references.
Currently, the most frequently renamed and supported controls are:
- Labels
- Buttons
Additional support for more controls will be incorporated based on feedback from preview.
Important
- This is a preview feature.
- This is available in English only.
- Preview features aren't meant for production use and might have restricted functionality. These features are subject to supplemental terms of use, and are available before an official release so that customers can get early access and provide feedback.
Prerequisites
Ensure you meet the prerequisites and region availability in Copilot in Power Apps overview (preview).
By default, Proactive control rename setting is enabled for new apps.
To use this feature for existing apps, follow these steps:
- Open your canvas app for editing in Power Apps Studio. On the command bar, select Settings > Updates.
- On the Preview tab, find and turn on the Proactive control rename setting.
- On the New tab, find and turn on the New analysis engine setting.
Rename controls
When you rename a control like the Button control, Copilot suggests names for other Button controls based on their properties.
Open your canvas app for editing in Power Apps Studio.
In the Tree view, select a control and then select More options (...).
Select Rename and type a new name for the control and then press Enter.
Note
When you manually rename a control, Copilot will only appear if there are additional controls on the same screen that can be renamed.
Copilot appears with suggestions to rename other controls that are the same type.
Select View Suggestions.
Review the suggested names and unselect any item that you don't want to rename.
When you're done, select Rename to apply the changes.
If a formula references a control, the control's name is automatically updated in the formula.
Best practices and recommendations
To get the best results from Copilot, use this feature after setting the Text property of a control. For example, Copilot won't suggest names for a button with the default Text property value Button or an invalid Text property value like If().
If you still don't get the desired results, send us your feedback.
When you manually rename a control, use standard and relevant names and naming patterns so Copilot can reference them while suggesting renames. Avoid using special characters and spaces. For example, renaming a Button to collectResponse provides better renaming suggestions for other buttons compared to using a name like collect_1.
Limitations
- Only the Label and Button controls are supported.
- When you rename a label manually, Copilot appears only if there are other labels under the same screen that can be renamed.
- Only controls with a valid Text property are considered for renaming by Copilot.
- The Text property can be a Text literal or a formula returning Text type.
- Only controls with nondefault Text property are considered for renaming. For instance, Text property value must not be the default value such as Button or Text.