You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: powerapps-docs/maker/canvas-apps/ai-formulas-formulabar.md
+44-4Lines changed: 44 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Use Copilot to create and edit Power Fx formulas in Power Apps
3
3
description: Learn how to use Copilot, an AI feature in Power Apps, to create and edit Power Fx formulas in the formula bar from natural language or code comments.
4
4
author: warrenbryant-msft
5
5
ms.author: warrenbryant
6
-
ms.date: 11/5/2024
6
+
ms.date: 11/6/2024
7
7
ms.topic: conceptual
8
8
ms.reviewer: mkaur
9
9
ms.subservice: canvas-maker
@@ -25,6 +25,7 @@ ms.custom:
25
25
26
26
Copilot is an AI feature in Power Apps Studio that helps you create and modify Power Fx formulas quickly. You can use Copilot in the formula bar to explain Power Fx formulas in natural language or generate Power Fx formulas from natural language or code comments.
27
27
28
+
28
29
## Prerequisites
29
30
30
31
Copilot must be enabled for your environment and tenant. For more information, see [Enable or disable Copilot (preview) in Power Apps](ai-overview.md#disable-copilot-in-power-apps).
@@ -44,9 +45,9 @@ Use Copilot in the formula bar to understand what a formula is doing in plain la
44
45
45
46
1. On the formula bar, select the **Copilot functionality menu** > **Explain this formula**, or select a subset of a formula and then select the **Copilot functionality menu** > **Explain this Selection** to explain only that part.
46
47
47
-
:::image type="content" source="media/copilot/ufb-explain-copilot.png" alt-text="Screenshot of the Copilot functionality menu showing the Explain this formula item.":::
48
+
:::image type="content" source="media/copilot/ufb-copilot-dropdown.png" alt-text="Screenshot of the Copilot functionality menu showing the Explain this formula item.":::
48
49
49
-
Copilot provides an explanation of the formula that you can copy and insert as a code comment or share with other makers who are working on the same app. When explaining a selection, the Copilot may explain additional context around the selection if it is important to providing the explanation.
50
+
Copilot provides an explanation of the formula that you can copy and insert as a code comment or share with other makers who are working on the same app. When explaining a selection, Copilot may also provide additional context if it is important for the explanation.
50
51
51
52
:::image type="content" source="media/copilot/ufb-explanation-copilot.png" alt-text="Screenshot of Copilot's explanation of a formula.":::
52
53
@@ -84,13 +85,51 @@ You can keep the comments used for generating Power Fx formulas in the formula b
84
85
85
86
### Known limitations of generating formulas from code comments
86
87
88
+
- Copilot works on that singular control and property, and it won't make changes to other controls or properties to achieve the desired outcome.
89
+
- Copilot doesn't take existing formula text into account.
87
90
- Copilot only recognizes default properties in Power Apps.
- Code comments only work with general Power Fx functions, and not Power Apps-specific functions such as `Navigate()`.
90
93
- The advanced panel doesn't trigger suggestions.
91
94
- Existing formulas for the property aren't included in the suggestion.
92
95
93
96
97
+
## Create a formula (preview)
98
+
99
+
[This section is prerelease documentation and is subject to change.]
100
+
101
+
From the Copilot button in the formula bar, you can now generate a formula from natural language from a discrete request.
102
+
103
+
### Prerequisites
104
+
105
+
Before you can use Copilot to create a formula from a discrete request in your canvas app, you need to turn on **Copilot for formula** in the app settings in [Power Apps](https://make.powerapps.com/).
106
+
107
+
1. Open your [canvas app for editing](edit-app.md) in Power Apps Studio. On the command bar, select **Settings** > **Updates**.
108
+
1. On the **Preview** tab, find and turn on the **Copilot for formulas** setting.
109
+
110
+
### Use Copilot to create a formula from a discrete request
111
+
112
+
1. Select a control and its corresponding property.
113
+
114
+
1. On the formula bar, select the **Copilot functionality menu** > **Create a formula**.
115
+
116
+
:::image type="content" source="media/copilot/ufb-copilot-dropdown.png" alt-text="Screenshot of the Copilot functionality menu showing the Create a formula item.":::
117
+
118
+
The Copilot menu opens inline when the formula bar is expanded, or below the formula bar if it's collapsed.
119
+
120
+
1. In the Copilot text box, type your request, such as *show today's day of the week*.
121
+
122
+
:::image type="content" source="media/copilot/ufb-create-input.png" alt-text="Screenshot of the Ceate a Formula functionality showing a sample input.":::
123
+
124
+
1. Copilot will attempt to create a formula. Select **Accept** to insert the formula in the same position as the Copilot interface, or update and resumbit your request.
125
+
126
+
:::image type="content" source="media/copilot/ufb-create-formula.png" alt-text="Screenshot of the Ceate a Formula functionality showing recommended formula.":::
127
+
128
+
> [!NOTE]
129
+
> The same limitations apply for creating a formulas from a discrete request as [generating formulas from code comments](ai-formulas-formulabar.md#known-limitations-of-generating-formulas-from-code-comments).
130
+
131
+
132
+
94
133
## Responsible AI
95
134
96
135
Understand the choices you have when working with AI. Learn more in [FAQ about using AI responsibly in Power Apps](../common/responsible-ai-overview.md). Review the [Power Fx Copilot FAQ](../common/faqs-copilot-powerfx.md) for questions about this feature specifically.
@@ -101,7 +140,7 @@ The following table lists the languages available for the formula bar copilot fe
0 commit comments