Skip to content

Commit d7e685f

Browse files
authored
Merge pull request #10528 from MicrosoftDocs/warrenbryant-msft-createaformula
add create a formula feature- waiting on publishing confirmation
2 parents 7f68a7d + 0b3a3a3 commit d7e685f

File tree

4 files changed

+44
-4
lines changed

4 files changed

+44
-4
lines changed

powerapps-docs/maker/canvas-apps/ai-formulas-formulabar.md

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Use Copilot to create and edit Power Fx formulas in Power Apps
33
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.
44
author: warrenbryant-msft
55
ms.author: warrenbryant
6-
ms.date: 11/5/2024
6+
ms.date: 11/6/2024
77
ms.topic: conceptual
88
ms.reviewer: mkaur
99
ms.subservice: canvas-maker
@@ -25,6 +25,7 @@ ms.custom:
2525

2626
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.
2727

28+
2829
## Prerequisites
2930

3031
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
4445

4546
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.
4647

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.":::
4849

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.
5051

5152
:::image type="content" source="media/copilot/ufb-explanation-copilot.png" alt-text="Screenshot of Copilot's explanation of a formula.":::
5253

@@ -84,13 +85,51 @@ You can keep the comments used for generating Power Fx formulas in the formula b
8485
8586
### Known limitations of generating formulas from code comments
8687

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.
8790
- Copilot only recognizes default properties in Power Apps.
8891
- Copilot doesn't recognize user-defined functions.
8992
- Code comments only work with general Power Fx functions, and not Power Apps-specific functions such as `Navigate()`.
9093
- The advanced panel doesn't trigger suggestions.
9194
- Existing formulas for the property aren't included in the suggestion.
9295

9396

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+
94133
## Responsible AI
95134

96135
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
101140

102141
| **Name** | **Language Code** | **Functionality Supported** |
103142
|----------|-------------------|-----------------------------|
104-
| English | en-US | Explain a formula, Comment generated formulas |
143+
| English | en-US | Explain a formula, Comment generated formulas, Create a formula|
105144
| Chinese (simplified) - China | zh-Hans | Explain a formula, Comment generated formulas |
106145
| Czech - Czech Republic | cs-CZ | Explain a formula, Comment generated formulas |
107146
| Danish - Denmark | da-DK | Explain a formula, Comment generated formulas |
@@ -121,3 +160,4 @@ The following table lists the languages available for the formula bar copilot fe
121160
| Swedish - Sweden | sv-SE | Explain a formula, Comment generated formulas |
122161
| Thai - Thailand | th-TH | Explain a formula, Comment generated formulas |
123162
| Turkish - Türkiye | tr-TR | Explain a formula, Comment generated formulas |
163+
Loading
Loading
Loading

0 commit comments

Comments
 (0)