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
+10-9Lines changed: 10 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,19 +67,19 @@ A connector in Power Apps is a data source connection. In this step, you'll crea
67
67
68
68
1. Scroll down. In Requests, select **+ Import from sample** button to configure a query request to your search service:
69
69
70
-
* Select the verb `GET`
70
+
* Select the verb `GET`
71
71
72
-
* For the URL enter a sample query for your search index (`search=*` returns all documents, `$select=` lets you choose fields). The API version is required. Fully specified, a URL might look like this: `https://mydemo.search.windows.net/indexes/hotels-sample-index/docs?search=*&$select=HotelName,Description,Address/City&api-version=2019-05-06`
72
+
* For the URL enter a sample query for your search index (`search=*` returns all documents, `$select=` lets you choose fields). The API version is required. Fully specified, a URL might look like this: `https://mydemo.search.windows.net/indexes/hotels-sample-index/docs?search=*&$select=HotelName,Description,Address/City&api-version=2019-05-06`
73
73
74
-
* For Headers, type `Content-Type`.
74
+
* For Headers, type `Content-Type`.
75
75
76
-
**Power Apps** will use the syntax to extract parameters from the query. Notice we explicitly defined the search field.
76
+
**Power Apps** will use the syntax to extract parameters from the query. Notice we explicitly defined the search field.
77
77
78
-
:::image type="content" source="./media/search-howto-powerapps/1-8-1-import-from-sample.png" alt-text="Import from sample" border="false":::
78
+
:::image type="content" source="./media/search-howto-powerapps/1-8-1-import-from-sample.png" alt-text="Import from sample" border="true":::
79
79
80
80
1. Click **Import** to auto-fill the Request. Complete setting the parameter metadata by clicking the **…** symbol next to each of the parameters. Click **Back** to return to the Request page after each parameter update.
81
81
82
-
:::image type="content" source="./media/search-howto-powerapps/1-8-2-import-from-sample.png" alt-text="Import from sample dialogue" border="false":::
82
+
:::image type="content" source="./media/search-howto-powerapps/1-8-2-import-from-sample.png" alt-text="Import from sample dialogue" border="true":::
83
83
84
84
1. For *search*: Set `*` as the **default value**, set **required** as *False* and set **visibility** to *none*.
85
85
@@ -108,7 +108,9 @@ A connector in Power Apps is a data source connection. In this step, you'll crea
108
108
109
109
1. Return to the **3. Request** step and scroll down to the Response section. Click **"Add default response"**. This is critical because it will help Power Apps understand the schema of the response.
110
110
111
-
1. Paste a sample response. An easy way to capture a sample response is through Search Explorer in the Azure portal. In Search Explorer, you should enter the same query as you did for the request, but add **$top=2** to constrain results to just two documents. Power Apps only needs to sample a few results to detect the schema: `search=*&$select=HotelName,Description,Address/City&$top=2`
111
+
1. Paste a sample response. An easy way to capture a sample response is through Search Explorer in the Azure portal. In Search Explorer, you should enter the same query as you did for the request, but add **$top=2** to constrain results to just two documents: : `search=*&$select=HotelName,Description,Address/City&$top=2`.
112
+
113
+
Power Apps only needs a few results to detect the schema.
112
114
113
115
```JSON
114
116
{
@@ -210,14 +212,13 @@ In this step, create a Power App with a search box, a search button, and a displ
210
212
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.
211
213
212
214
> [!NOTE]
213
-
> If you get a formula syntax error "The function 'ClearCollect' has some invalid functions":
215
+
> Try this if you get a formula syntax error "The function 'ClearCollect' has some invalid functions":
214
216
>
215
217
> * First, make sure the connector reference is correct. Clear the connector name and begin typing the name of your connector. Intellisense should suggest the right connector and verb.
216
218
>
217
219
> * If the error persists, delete and recreate the connector. If there are multiple instances of a connector, the app might be using the wrong one.
218
220
>
219
221
220
-
221
222
1. Link the Vertical Gallery control to the *azResult* collection that was created when you completed the previous step.
222
223
223
224
Select the gallery control, and perform the following actions in the properties pane.
0 commit comments