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: articles/search/search-howto-powerapps.md
+21-21Lines changed: 21 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: How to query Azure Cognitive Search from Power Apps
3
3
titleSuffix: Azure Cognitive Search
4
-
description: Step by step guidance on how to create custom connector to Cognitive Search and how to visualize it from a PowerApp
4
+
description: Step-by-step guidance on how to create custom connector to Cognitive Search and how to visualize it from a PowerApp
5
5
author: luiscabrer
6
6
manager: eladz
7
7
ms.author: luisca
@@ -13,10 +13,10 @@ ms.date: 03/25/2020
13
13
14
14
# How to query a Cognitive Search index from Power Apps
15
15
16
-
This tutorial shows you how to integrate results from Azure Cognitive Search into a PowerApp.
16
+
This tutorial shows you how to integrate results from Azure Cognitive Search into a Power App.
17
17
18
18
## Prerequisites:
19
-
1.PowerApp account access with the ability to create custom connectors.
19
+
1.Power Apps account access with the ability to create custom connectors.
20
20
2. We assume you have already created an Azure Search Index.
21
21
22
22
There are two main steps to having a PowerApp that shows Azure Cognitive Search results. First creating a connector that can query the search index, and then updating your power app application to visualize the results returned by the connector.
@@ -32,38 +32,38 @@ There are two main steps to having a PowerApp that shows Azure Cognitive Search
32
32
33
33

34
34
35
-
4. Give your custom connector a name. (i.e.*AzureSearchQuery*), and then click **Continue**. This will bring up a wizard to create your new connector.
35
+
4. Give your custom connector a name. (that is,*AzureSearchQuery*), and then click **Continue**. This will bring up a wizard to create your new connector.
36
36
37
37
5. Enter information in the General Page.
38
38
39
-
- Icon background color (i.e. #007ee5)
40
-
- Description (i.e. "A connector to Azure Cognitive Search")
41
-
- In the Host, you will need to enter your search service URL (i.e. <<yourservicename>>.search.windows.net)
39
+
- Icon background color (for instance, #007ee5)
40
+
- Description (for instance, "A connector to Azure Cognitive Search")
41
+
- In the Host, you will need to enter your search service URL (for instance, `<yourservicename>.search.windows.net`)
42
42
- For Base URL, simply enter "/"
43
43
44
44

45
45
46
-
6. In the Security Page, set *API Key* as the **Authentication Type**, set the parameter label, and parameter name fields as *api-key". For Parameter location select *Header* as shown below.
46
+
6. In the Security Page, set *API Key* as the **Authentication Type**, set the parameter label, and parameter name fields as *api-key*. For **Parameter location**, select *Header* as shown below.
47
47
48
48

49
49
50
-
7. In the Definitions Page, select **+ New Action** to create an action that will query the index. Enter the value "Query" for the summary and the name of the operation Id. Enter a description like *"Queries the search index"*.
50
+
7. In the Definitions Page, select **+ New Action** to create an action that will query the index. Enter the value "Query" for the summary and the name of the operation ID. Enter a description like *"Queries the search index"*.
PowerApps will use the syntax to extract parameters from the query. Notice we explicitly defined the search field.
62
+
**Power Apps** will use the syntax to extract parameters from the query. Notice we explicitly defined the search field.
63
63
64
64

65
65
66
-
9. Click **Import**. This will automatically pre-fill the Request dialog.
66
+
9. Click **Import** to automatically pre-fill the Request dialog.
67
67
68
68

69
69
@@ -81,7 +81,7 @@ There are two main steps to having a PowerApp that shows Azure Cognitive Search
81
81
82
82
- Similarly, for *api-key*, set it as **required**, with *internal***visibility**. Enter your search service API key as the **default value**.
83
83
84
-
After you make these changes, you should be able to toggle the **Swagger Editor** view, and in the parameters section you should be able to see the following:
84
+
After you make these changes, toggle to the **Swagger Editor** view. In the parameters section you should see the following configuration:
85
85
86
86
```
87
87
parameters:
@@ -92,7 +92,7 @@ There are two main steps to having a PowerApp that shows Azure Cognitive Search
92
92
x-ms-visibility: internal}
93
93
```
94
94
95
-
11. On the Response section, click **"Add default response"**. This is critical because it will help PowerApps understand the schema of the response. Paste a sample response.
95
+
11. On the Response section, click **"Add default response"**. This is critical because it will help **Power Apps** understand the schema of the response. Paste a sample response.
96
96
97
97
> [!TIP]
98
98
> There is a character limit to the JSON response you can enter, so you may want to simplify the JSON so that it before pasting it. The important aspect schema/format of the response. The actual values in the sample response are less important and can be simplified to reduce the character count.
@@ -104,27 +104,27 @@ There are two main steps to having a PowerApp that shows Azure Cognitive Search
104
104
105
105
This step may take you to the out of the wizard and into the Connections page. You may want to go back to the Custom Connections editor to actually test the connection. Go to **Custom Connector** > Select the newly created Connector > … > **View Properties** > **Edit** > **4. Test** to get back to the test page.
106
106
107
-
14. Now click **Test operation** to make sure that you are getting results from your index. If you were successful you should see a 200 status an in the body of the response you should see JSON that describes your search results.
107
+
14. Now click **Test operation** to make sure that you are getting results from your index. If you were successful you should see a 200 status, and in the body of the response you should see JSON that describes your search results.
108
108
109
109
110
110
111
111
112
112
## Visualize Results from the Customer Connector we just created
113
-
The goal of this tutorial is not to show you how to create fancy user experiences with power apps, so the UI we will create is really minimalistic. We will create a PowerApp with a search box, a search button and we will display the results in a gallery control. The PowerApp will connect to our recently created custom connector to get the data from Azure Search.
113
+
The goal of this tutorial is not to show you how to create fancy user experiences with power apps, so the UI layout will be minimalistic. Let's create a PowerApp with a search box, a search button and display the results in a gallery control. The PowerApp will connect to our recently created custom connector to get the data from Azure Search.
114
114
115
115
1. Create new Power App
116
-
Go to the **Apps** section, click on **+ New app**, and selecte **Canvas**
116
+
Go to the **Apps** section, click on **+ New app**, and select **Canvas**
2. Select the type of application you would like. For this tutorial, we will create a **Blank App** with the **Phone Layout**. You may want a different layout. This will open the PowerApps Studio.
120
+
2. Select the type of application you would like. For this tutorialcreate a **Blank App** with the **Phone Layout**. The **Power Apps Studio** will appear.
121
121
122
-
3. Once in the PowerApps Studio , select the Data Sources tab, and click on the new Connector you have just created. In our case, it is called AzureSearchQuery. Click Add a connection.
122
+
3. Once in the studio, select the **Data Sources** tab, and click on the new Connector you have just created. In our case, it is called *AzureSearchQuery*. Click **Add a connection**.
This will cause the button to update a new collection called *azResult* with the result of the search query, using the text in the *txtQuery* text box as an input.
152
+
This action will cause the button to update a new collection called *azResult* with the result of the search query, using the text in the *txtQuery* text box as the query term.
153
153
154
154
7. As a next step, we will link the vertical gallery we created to the *azResult* collection. Select the gallery control, and perform the following actions in the properties pane.
0 commit comments