|
1 | 1 | ---
|
2 | 2 | title: "Use template tags for a portal | MicrosoftDocs"
|
3 | 3 | description: "Learn about template tags available in portal"
|
4 |
| -author: sbmjais |
5 |
| -manager: shujoshi |
| 4 | +author: tapanm-msft |
| 5 | +manager: kumarvivek |
6 | 6 | ms.service: powerapps
|
7 | 7 | ms.topic: conceptual
|
8 | 8 | ms.custom:
|
9 |
| -ms.date: 10/07/2019 |
10 |
| -ms.author: shjais |
| 9 | +ms.date: 01/17/2020 |
| 10 | +ms.author: tapanm |
11 | 11 | ms.reviewer:
|
12 | 12 | ---
|
13 | 13 |
|
14 | 14 | # Template tags
|
15 | 15 |
|
16 | 16 | Template tags control the output of a template in various ways, and allow the combination of multiple templates into a single output.
|
17 | 17 |
|
| 18 | +## fetchxml |
| 19 | + |
| 20 | +Allows user to query data from CDS and render the results in a page. |
| 21 | + |
| 22 | +> [!NOTE] |
| 23 | +> You can learn more about querying the data using fetchxml at [use FetchXML to query data](https://docs.microsoft.com/powerapps/developer/common-data-service/use-fetchxml-construct-query). |
| 24 | +
|
| 25 | +``` |
| 26 | +{% fetchxml resultVariable %} |
| 27 | +<!— Fetchxml query --> |
| 28 | +... |
| 29 | +{% endfetchxml %} |
| 30 | +``` |
| 31 | + |
| 32 | +### Results attribute |
| 33 | + |
| 34 | +Results attribute in provided variable (such as 'resultVariable' in above sample) holds FetchXML query results and a few other attributes. |
| 35 | + |
| 36 | +- *Entities* |
| 37 | + |
| 38 | + This attribute contains the result of fetchxml query. You can iterate the result and use it in your webtemplate. |
| 39 | + |
| 40 | + ``` |
| 41 | + <table> |
| 42 | + {% for entityVariable in resultVariable.results.entities %} |
| 43 | + <tr> |
| 44 | + <td>Attribut-1: {{ entityVariable.attribute1 }}</td> |
| 45 | + <td>Attribut-2: {{ entityVariable.attribute2 }}</td> |
| 46 | + </tr> |
| 47 | + {% endfor %} |
| 48 | + </table> |
| 49 | + ``` |
| 50 | +
|
| 51 | +- *EntityName* |
| 52 | +
|
| 53 | + Gets the logical name of the entity. |
| 54 | +
|
| 55 | +- *ExtensionData* |
| 56 | +
|
| 57 | + Gets the structure that contains extra data. |
| 58 | +
|
| 59 | +- *MinActiveRowVersion* |
| 60 | +
|
| 61 | + Gets the lowest active row version value. |
| 62 | +
|
| 63 | +- *MoreRecords* |
| 64 | +
|
| 65 | + Gets whether there are more records available. |
| 66 | +
|
| 67 | +- *PagingCookie* |
| 68 | +
|
| 69 | + Gets the current paging information. |
| 70 | +
|
| 71 | +- *TotalRecordCount* |
| 72 | +
|
| 73 | + Gets the total number of records in the collection. <br/> |
| 74 | + ReturnTotalRecordCount was true when the query was executed. |
| 75 | +
|
| 76 | +- *TotalRecordCountLimitExceeded* |
| 77 | +
|
| 78 | + Gets whether the results of the query exceeds the total record count. |
| 79 | +
|
| 80 | +### XML attribute |
| 81 | +
|
| 82 | +XML attribute in provided variable (such as “resultVariable” in above sample) holds the resultant query which can be used to get data from Common Data Service. This attribute is useful for debugging purpose when you want to understand how entity permission is getting applied on this *fetchxml* tag. |
| 83 | +
|
18 | 84 | ## include
|
19 | 85 |
|
20 | 86 | Includes the contents of one template in another, by name. In Power Apps portals, the source of this other template will generally be a [web template](store-content-web-templates.md). This allows for the reuse of common template fragments in multiple places.
|
|
0 commit comments