Prompts in Power Apps allow you to describe the app, screen, or data structure you want in plain English to automatically generate the underlying components. Most users mistake these prompts for simple search bars, but they are actually generative tools that build functional layouts and formulas based on your description.

Describe Your App to Create the Initial Structure

The primary way to use prompts is during the initial app creation phase. Instead of starting with a blank canvas, you provide a descriptive sentence that tells the system what the app is for and what data it needs to track. This process generates a table in Dataverse, a set of screens, and a basic gallery to view the records.

To start, navigate to the home screen and locate the text box for describing your app. Your prompt should include the primary purpose of the app and the specific items you need to manage. For example, instead of typing "Inventory app," type "An app to track office supply inventory including item name, quantity, supplier, and reorder date." This level of detail tells the system exactly which columns to create in your data table.

Once you submit the prompt, the system suggests a table schema. You can review these columns and add or remove fields before the app is actually built. This step is vital because changing the data structure later is more time-consuming than refining it during the prompt phase. After you confirm the table, the system builds a three-screen app consisting of a Browse screen, a Detail screen, and an Edit screen.

Refine Individual Screens with Natural Language

After the initial app is generated, you can use prompts to add specific functionality to existing screens or create new ones. This allows you to expand your app without manually dragging and dropping every single control or writing complex Power Fx formulas from scratch.

To add a new element, select the Copilot or prompt pane within the editor. You can request specific UI changes such as "Add a button that sends an email to the manager when the inventory is low" or "Add a date picker to filter the gallery by the reorder date." The system interprets these requests and places the control on the screen, often pre-configuring the OnSelect or Items properties with the necessary logic.

When prompting for screen changes, be specific about the relationship between elements. If you want a text input to filter a list, specify both the input and the list. For example, "Create a search bar that filters the Gallery1 items by the item name column." This prevents the system from creating a generic search bar that is not connected to your data source.

Automate Logic and Formulas Using Prompts

One of the most powerful uses of prompts is generating Power Fx formulas. Writing formulas manually requires knowledge of specific syntax and function names, but prompts allow you to describe the logic you want to achieve.

You can use prompts to create conditional formatting or complex calculations. If you want a label to change color based on a value, you might prompt "Make the label text red if the quantity is less than 5, otherwise make it green." The system will then generate a formula similar to If(ThisItem.Quantity < 5, Color.Red, Color.Green) in the Color property of the label.

For data manipulation, you can prompt for filtering and sorting. A prompt like "Sort the gallery by the reorder date in ascending order" will generate the SortByColumns function. This is particularly helpful for beginners who know what they want the app to do but are not yet fluent in the Power Fx language. Always check the generated formula to ensure it references the correct column names from your table, as labels can differ by version.

Choose the Right Prompt Style for Your Goal

The effectiveness of a prompt depends on how you frame the request. Broad prompts create generic templates, while specific prompts create tailored tools. You can use the following table to determine the level of detail needed for different tasks.

Goal Prompt Style Example Prompt
New App Purpose + Data Fields "App to track employee training with name, course, date, and status."
New Screen Action + Target Element "Add a screen to capture user feedback with a rating star and text box."
Logic/Formula Condition + Result "Set the visibility of the button to false if the status is 'Completed'."

A useful rule of thumb is the "Who, What, and How" rule: tell the system who is using the app, what data they are interacting with, and how the app should react. Following this ensures the generated components are functional and require minimal manual adjustment.

Fix Common Prompting Failures

Prompts can sometimes produce results that do not align with your vision. This usually happens because the prompt was too vague or the system misinterpreted a common word. If the generated screen looks wrong, do not delete it immediately; try refining the prompt first.

One common issue is the "Generic Component" error, where the system adds a button or label but does not connect it to your data. This happens when you use words like "it" or "the list" without specifying the exact name of the control (e.g., Gallery1). To fix this, re-prompt using the specific name of the control you want to affect.

Another frequent problem is the "Incorrect Data Type" error. For example, if you prompt for a "date" but the system creates a "text" column, your date pickers will not work. You must go into the Dataverse table settings, change the column type to Date, and then refresh your app. The prompt tool creates the structure, but the data type must be strictly enforced in the backend for the app to function.

If a formula generated by a prompt results in an error (indicated by a red underline), check the column names. The system may use a display name like "Item Name" in the prompt, but the internal logical name might be "cr_item_name." Manually updating the logical name in the formula usually resolves the issue.

Power Apps Prompts for Complex Data Relationships

When your app needs to handle more than one table, your prompts must account for relationships. A simple prompt cannot always guess how two tables should link, such as linking a "Customers" table to an "Orders" table.

To handle this, first prompt for the primary table (Customers). Once that is created, prompt for the second table (Orders) and explicitly mention the link. For example, "Create an Orders table that links each order to a customer from the Customers table." This encourages the system to create a Lookup column, which is essential for relational data.

Once the relationship is established, you can prompt for screens that display this related data. A prompt like "Add a gallery to the Customer Detail screen that shows all orders for the selected customer" will tell the system to filter the Orders gallery based on the ID of the customer currently being viewed. This creates a professional, interconnected experience rather than a series of isolated lists.