Model-driven apps are driven by configuration. You can give high-level instructions to generate an app. You can also introduce custom components that affect multiple parts of the app. When an app isn't behaving as expected, it may not be obvious if it's a customization error or a bug in the Power Apps system.
Here are some techniques to isolate problems in a model-driven app.
Business rules change a form's behavior based on the state of a record. Try disabling or simplifying the rule and check if the form still works as expected.
If a problem happens after selecting a command in the command bar, check if it's a custom command. Custom commands can contain JavaScript code that causes unexpected behavior. Modern commands can have custom actions defined with Power Fx. In either case, try simplifying the command to find out if there's an error in how the custom command is defined.
Custom controls
Affects: Form pages, Table-based view pages, Custom pages
To help determine if something is a configuration error, it can be useful to check other parts of the app.
For example, does the problem happen with a different:
Table (entity)
View
App with the same table
Form for the same table
Control referencing the same column (attribute)
Ideally, compare with an out-of-the-box one that hasn't been customized. For example, if the issue is with a table (entity) you created, check an out-of-the-box table.
If the problem doesn't happen elsewhere, compare the differences with how they're configured. Perhaps table relationships and permissions are set up differently. Or a table isn't enabled for Unified Interface.
Re-create items
Creating an item from scratch not only allows you to examine and compare default configurations, it can also fix corrupted configurations.
If any of the following aren't working, try re-creating them. It can be a simplified version, to narrow down which part isn't working.
Custom table (entity)
View
Form
Custom script
Ensure all required components are added to an app
Model-driven app components include tables and their related tables, forms, columns, views, charts, dashboards, and business process flows. For performance reasons, only components added to an app will be downloaded.
If a component doesn't appear or behaves inconsistently, check if it's added to the app. For example, if the Teams table doesn't appear in a form's lookup control, but other tables do, then the Teams table might not have been added to the app.
You can add the following components to an app using the modern app designer.
Find out if the issue occurs when getting data or showing data
When data isn't showing correctly in an app, it could either be a server issue in providing the data, or an app issue in processing and displaying it. To narrow down the cause, you can try general methods for isolating the problematic layer.
Model-driven apps have a complex data flow. Here are more advanced things to try.
Examine the FetchXML of network requests and check if the app is making the right network requests and receiving data correctly from the server. You can use Monitor to view network requests.
If the app has an offline profile, try removing the user from the profile or the profile entirely. Even when there's an Internet connection, the data flow is different for apps that can work offline.
Check for permission issues by trying a different user or table.
Simplify custom scripts
Custom scripts are an advanced feature for developers. They can be used on forms, custom commands, Power Apps components, and webpage (HTML) web resources. There's enormous flexibility in what scripts can do, but there's also a high chance that they can accidentally break the system.
If you suspect that a script is causing an issue, follow these steps:
Disable all custom scripts and see if the issue still happens.
If it doesn't, enable scripts one by one to see which one causes the issue.
Once the script(s) are found that cause the issue, remove irrelevant code from them. For example, if only one field has a problem, remove code that interacts with other form fields.
By progressively simplifying the script, you should be able to determine if the problem is caused by custom code or incorrect behavior of Client API features.
If the error is from custom code, contact the developer who wrote the script for assistance.
If a Client API feature isn't working as documented, you can report it to Microsoft. Attach a copy of the simplified script and mention which API feature isn't working.
Create a vanilla repro app
The process of creating a vanilla repro app may uncover configuration errors that aren't obvious in an environment with many customizations. Even if the problem isn't fixed, you would have narrowed the cause and made it easier to explain the problem to others.
Demonstrate the use of Microsoft Power Platform solutions to simplify, automate, and empower business processes for organizations in the role of a Functional Consultant.
Lookups in model-driven apps have an advanced mode for a more immersive experience, supporting searching for rows based on views and viewing results in a table.