Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Use the code view feature to look at the underlying code for each control on your app's screens. The code uses an improved format that's a subset of YAML.
With code view you can:
- View the code for each control on your screen.
- Copy the code for a control and share it outside of Power Apps Studio.
- Paste the code for a control and create a new control based on it.
View, copy, and paste code
Code view shows the code for the selected control and all its child controls.
Code view lets you copy and paste code to any screen in your app or outside of Power Apps to duplicate the control. This feature is helpful when controls are highly customized and you want to share or duplicate them.
View code
Open your app for editing in Power Apps Studio.
Right-click the control in the tree view or on the screen, and then select View code.
Tip
Use the keyboard shortcut Ctrl+F
to find a specific string in the code.
Copy and paste code
To copy the code of a selected control:
- Use the menu to copy.
- Use the shortcut Ctrl+C.
- When viewing your code in the code view popup, select Copy code.
To add a new control from the code:
Use the menu to paste.
Use the shortcut Ctrl+V.
Important
Use the YAML format that Power Apps Studio generates. The code is validated before the new control is created.
Browser clipboard access required
To paste code into Power Apps Studio using code view, your browser must have access to the clipboard. If you encounter issues pasting code, check your browser settings and ensure clipboard permissions are enabled for the site.
The first time you paste code, your browser will prompt you to grant clipboard access. Approve this request to enable pasting functionality in Power Apps Studio.
Tip
If pasting doesn't work, check if clipboard access to Power Apps is blocked in your browser. In Microsoft Edge, you can manually add https://make.powerapps.com to the allowed sites for clipboard access in your browser settings.
Known limitations
- You can't copy and paste or view the code for the App Object.
- You can't edit the code in the code view.