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: powerapps-docs/maker/portals/liquid/template-tags.md
+67-1Lines changed: 67 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ manager: kvivek
6
6
ms.service: powerapps
7
7
ms.topic: conceptual
8
8
ms.custom:
9
-
ms.date: 10/07/2019
9
+
ms.date: 01/24/2020
10
10
ms.author: tapanm
11
11
ms.reviewer:
12
12
---
@@ -15,6 +15,72 @@ ms.reviewer:
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 %}
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