Skip to content

Commit faa6809

Browse files
authored
Merge pull request #9223 from MicrosoftDocs/main
pushing to live
2 parents 58a69b9 + 6b378dd commit faa6809

12 files changed

+145
-8
lines changed

powerapps-docs/maker/TOC.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,8 @@
460460
href: ./canvas-apps/use-line-pie-bar-chart.md
461461
- name: Add multimedia
462462
href: ./canvas-apps/add-images-pictures-audio-video.md
463+
- name: Use Copilot answer control (preview)
464+
href: ./canvas-apps/copilot-answer-control-overview.md
463465
- name: "Add mixed reality controls"
464466
items:
465467
- name: Mixed reality controls
@@ -540,6 +542,8 @@
540542
href: ./canvas-apps/controls/modern-controls/modern-controls-badge.md
541543
- name: Checkbox (preview)
542544
href: ./canvas-apps/controls/modern-controls/modern-control-checkbox.md
545+
- name: Copilot answer (preview)
546+
href: ./canvas-apps/controls/modern-controls/modern-control-copilot-answer.md
543547
- name: Date picker (preview)
544548
href: ./canvas-apps/controls/modern-controls/modern-controls-date-picker.md
545549
- name: Dropdown (preview)

powerapps-docs/maker/canvas-apps/connections/connection-azure-sqldatabase.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,37 +47,41 @@ You can directly call SQL Server stored procedures from Power Fx by turning on t
4747

4848
1. Go to **Settings** > **Upcoming features** > **Preview**.
4949
1. Search for _stored procedures_.
50-
1. Turn on the preview switch as shown.
50+
1. Turn on the preview switch as shown. (You will need to save and reopen the app.)
5151

5252
:::image type="content" source="media/connection-azure-sqldatabase/previewflag-call-sp-direct.png" alt-text="Screenshot that shows the SQL Server stored procedures toggle set to On.":::
5353

54-
When you add a SQL Server connection to your app, you can now add tables and views or stored procedures.
54+
When you add a SQL Server connection to your app, you can now add tables and views or stored procedures. This feature also works with secure implicit connections.
5555

5656
:::image type="content" source="media/connection-azure-sqldatabase/tables-views-stored-proc-selector.png" alt-text="Screenshot that shows lists of tables, views, and stored procedures available to be added to your app.":::
5757

5858
If you don't immediately see your stored procedure, it's faster to search for it.
5959

6060
Once you select a stored procedure, a child node appears and you can designate the stored procedure as **Safe to use for galleries and tables**. If you check this option, you can assign your stored procedure as an **Items** property for galleries for tables to use in your app.
6161

62-
Enable this option only if:
62+
Enable this option **only if**:
6363

64-
1. There are no side effects to calling this procedure on demand, multiple times, whenever Power Apps refreshes the control. When used with an **Items** property of a gallery or table, Power Apps calls the stored procedure whenever the system determines a refresh is needed. You can't control when the stored procedure is called.
65-
2. The stored procedure returns less than the delegable limit (500/2000) of records. When a table or view is assigned to an **Items** property, Power Apps can control the paging and bring in 100 records at a time, when it needs it. Stored procedures are different and might be pageable through an argument to the stored procedure. But Power Apps can't bring in pages automatically like it can for tables and views. The author must configure pageability.
64+
1. There are **no side effects** to calling this procedure on demand, multiple times, whenever Power Apps refreshes the control. When used with an **Items** property of a gallery or table, Power Apps calls the stored procedure whenever the system determines a refresh is needed. You can't control when the stored procedure is called.
65+
2. The amount of data you return in the stored procedure is **modest**. Action calls, such as stored procedures, do not have a limit on the number of rows retrieved. They are not automatically paged in 100 record increments like tabular data sources (tables or views.) So, if the stored procedure returns a lot of data (many thousands of records) then your app may slow down or crash. For performance reasons you should bring in less than 2000 records.
6666

6767
### Example
6868

6969
When you add a stored procedure, you might see more than one data source in your project.
7070

7171
:::image type="content" source="media/connection-azure-sqldatabase/sqlserver-datasources.png" alt-text="Screenshot that shows SQL data sources.":::
7272

73-
Prefix the stored procedure name with the name of connector associated with it. For example, _DataCardValue3_1.Text_ is from the _DataCard_ connector.
73+
To use a stored procedure in Power Apps, first prefix the stored procedure name with the name of connector associated with it and the name the stored procedure. 'Paruntimedb.dbonewlibrarybook' in the example illustrates this pattern. Note also that when Power Apps brings the stored procedure in, it concatenates the full name. So, 'dbo.newlibrarybook' becomes 'dbonewlibrarybook'.
7474

75-
Label the values, for example using a number, as necessary since you're reading from a text value in Power Apps.
75+
Remember to convert values appropriately as you pass them into your stored procedure as necessary since you're reading from a text value in Power Apps. For example, if you are updating an integer in SQL you must convert the text in the field using 'Value()'.
7676

7777
![Calling stored procedures directly.](media/connection-azure-sqldatabase/calling-sp-directly.png "Calling stored procedures directly.")
7878

7979
> [!TIP]
80-
> To use a stored procedure in an **Item** property for a gallery or table, use the stored procedure name where you'd use the table name.
80+
> To use a stored procedure in an **Item** property for a gallery or table, use the stored procedure name where you'd use the table name. Views do not have primary keys so you will need to supply a key value for record specific operations. You can access the stored procedure after you declare it safe for the UI. Reference the data source name and the the name of the stored procedure followed by 'ResultSets'. You can access multiple results by indexing through list of tables returned.
81+
>
82+
```powerapps-dot
83+
Paruntimedb.dbospshowalllibrarybooks().ResultSets.Table1
84+
```
8185

8286
## Known issues
8387

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
title: Copilot answer modern control in Power Apps
3+
description: Learn about the details, properties, and examples of the Copilot answer modern control in Power Apps.
4+
author: yogeshgupta698
5+
6+
ms.topic: reference
7+
ms.component: canvas
8+
ms.date: 2/14/2024
9+
ms.subservice: canvas-maker
10+
ms.author: yogupt
11+
ms.reviewer: mkaur
12+
search.audienceType:
13+
- maker
14+
contributors:
15+
- mduelae
16+
- yogeshgupta698
17+
18+
---
19+
# Copilot answer modern control in Power Apps (preview)
20+
21+
[This article is pre-release document and is subject to change.]
22+
23+
A control that makers can use to add predefined questions that end users can use to get generated answers.
24+
25+
## Description
26+
27+
Makers can use the Copilot answer control to set predefined questions that end users can use to get generative answers with a single click. The control is optimized for mobile users and is powered by Microsoft Copilot.
28+
29+
## Key properties
30+
31+
**Data source (Items)** – The Copilot answer control only supports Dataverse as the data source. The answer to the question comes from the Dataverse table that you select.
32+
33+
**Views** – A user can select any of the views that are available in the data source.
34+
35+
**Fields** - Default list of fields available for the table. Users can select **Edit** to see the list of fields. They can also add or modify the fields based on their requirements.
36+
37+
**Title** – A label that is displayed at the top of the Copilot answer control.
38+
39+
**Question for Copilot** – This is the question a maker asks the Copilot answer control. The question is used as the prompt to generate a response that is displayed by the answer control that's based on the selected **Data source** property.
40+
41+
42+
## Additional properties
43+
44+
**Show answer** – Should the Copilot answer control answer a question when the user clicks on the ‘Arrow’ icon (After sending) or as soon as the control loads when the question is defined in the properties window (Immediate).
45+
46+
**DisplayMode** – Whether the control allows user input (Edit), only displays data (View), or is disabled (Disabled).
47+
48+
**Position** - Whether a control appears or is hidden.
49+
50+
**[X](../properties-size-___location.md)** – The distance between the left edge of a control and the left edge of its parent container (screen if no parent container).
51+
52+
**[Y](../properties-size-___location.md)** – The distance between the top edge of a control and the top edge of the parent container (screen if no parent container).
53+
54+
**[Size](../properties-text.md)** – The size of the control on the canvas

powerapps-docs/maker/canvas-apps/controls/modern-controls/modern-controls-reference.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ Configure the behavior of a modern control by setting one of its properties. Eac
3131

3232
**[Checkbox](modern-control-checkbox.md)** - Select or clear an option to specify **true** or **false**.
3333

34+
**[Copilot answer (preview)](modern-control-copilot-answer.md)** - A control that makers can use to add predefined questions that end users can use to get generated answers.
35+
3436
**[Date picker](modern-controls-date-picker.md)** - A control that the user can select to specify a date.
3537

3638
**[Dropdown](modern-control-dropdown.md)** – Select a value from the list of items.
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
title: Overivew of Copilot answer control for canvas apps
3+
description: Use the Copilot answer control for canvas app.
4+
author: mduelae
5+
ms.topic: conceptual
6+
ms.custom: canvas
7+
ms.collection:
8+
- bap-ai-copilot
9+
- get started
10+
ms.reviewer: mkaur
11+
ms.date: 2/13/2024
12+
ms.subservice: canvas-maker
13+
ms.author: arijitba
14+
search.audienceType:
15+
- maker
16+
contributors:
17+
- mduelae
18+
---
19+
20+
# Use Copilot answer control for canvas apps (preview)
21+
22+
[This article is prerelease documentation and is subject to change.]
23+
24+
Makers can use the Copilot answer control to set predefined questions that end users can use to get AI-generated information with a single click. The control is powered by Microsoft Copilot and is designed for mobile users to provide them with immediate answers to frequently asked questions.
25+
26+
:::image type="content" source="media/answer-control/answer-control-shown-on-mobile.png" alt-text="Answers shown on mobile":::
27+
28+
## Enable Copilot answer control for your environment
29+
30+
To use the Copilot answer control in a canvas app, an admin must first turn on the feature, **Allow canvas editors to insert the Copilot answer component, which allows users to receive an AI-powered answer to a predefined data query** in their environment.
31+
32+
This setting can be found in the [Power Platform admin center](https://admin.powerplatform.microsoft.com) by going to **Environments** > [select an environment] > **Settings** > **Product** > **Features**. For more information, see [Manage feature settings](/power-platform/admin/settings-features#copilot-preview).
33+
34+
:::image type="content" source="media/answer-control/answer-control-enable-by-admin.jpg" alt-text="Turn on Copilot answer control on Power Platform admin center":::
35+
36+
## Add Copilot answer control
37+
38+
With your [canvas app open for editing](edit-app.md) in Power Apps Studio:
39+
40+
1. On the command bar, select **Insert** and then select one of the following options:
41+
42+
- **Modern** > **Copilot answer (preview)**
43+
- **Classic** > **Copilot answer (preview)**
44+
45+
:::image type="content" source="media/answer-control/answer-control-insert.png" alt-text="Insert answer control":::
46+
47+
1. When the **Copilot answer (preview)** control is added to the canvas app, select a data source from the pane. Copilot only supports Dataverse tables.
48+
49+
:::image type="content" source="media/answer-control/answer-control-select-data-type.png" alt-text="Select data source":::
50+
51+
1. On the control properties pane, select the **Properties** tab.
52+
53+
1. In the properties, enter the **Title**, **Questions for Copilot**, and **Show answer** for the question. You can also edit other control properties as needed.
54+
55+
:::image type="content" source="media/answer-control/answer-control-properties.png" alt-text="Answer control properties":::
56+
57+
1. When you're done, [save and publish](save-publish-app.md) your app.
58+
59+
## Use Copilot answer control
60+
61+
End users can regenerate responses and provide feedback on the quality of responses.
62+
63+
Follow these steps to see answers generated by the Copilot answer control:
64+
65+
1. Open a canvas app on Power Apps mobile and navigate to the Copilot answer control in your app.
66+
1. On the Copilot answer control select, **Send**.
67+
68+
:::image type="content" source="media/answer-control/answer-control-send.png" alt-text="Use Copilot answer control on mobile":::
69+
70+

powerapps-docs/maker/canvas-apps/gateway-reference.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ There are four main steps for using a gateway.
4343
3. [Add gateway admins](/data-integration/gateway/service-gateway-manage) who can also manage and administer other network requirements.
4444
4. [Troubleshoot](/data-integration/gateway/service-gateway-tshoot) the gateway in case of errors.
4545

46+
## End user accessing via a gateway
47+
An end user will use the credentials for the gateway that the Power Apps author used to create the gateway. End users will see a connection in the consent dialog but it will be with the credentials provided by the Power Apps author.
48+
4649
## Next steps
4750

4851
- [Install the on-premises data gateway](/data-integration/gateway/service-gateway-install)
26 KB
Loading
42.2 KB
Loading
23.2 KB
Loading
43.5 KB
Loading

0 commit comments

Comments
 (0)