Hide last authors
Outhman Moustaghfir 3.1 1 = Introduction =
Outhman Moustaghfir 2.1 2
3 In this section, we will go throw an XSL function to get trackings by trkID or using Keys/Values.
4
5 = Parameters =
6
Outhman Moustaghfir 3.2 7 GetTracking uses 4 params to help retrieve trackings in question.
Outhman Moustaghfir 2.1 8
Outhman Moustaghfir 3.1 9 1. xpathExpression: read the IXpathExpression for more details ([[IXpathExpression>>https://ixpath.app/xwiki/bin/view/iXPath%20V3/IXpathExpression/]])
Outhman Moustaghfir 3.2 10 1. limit: it defines the max number of tracking to retrieve. **it's optional. **(Optional)
11 1. order: whether you want to order the list of trackings in a descending way or not by a certain key order. The default value is 'trkID' and it's optional as long as you fill in the limit value. (Optional)
12 1. projection: you can return only some wanted fields instead of fetching the integrity of tracking object. (Optional)
Outhman Moustaghfir 2.1 13
14 = Uses =
15
16 We suppose that we have a tracking type named Product. It has 3 data (Name, Brand, and Country).
17
18 if we want to get Product by key values
19
Outhman Moustaghfir 4.1 20 {{code language="XML"}}<xsl:value-of select="ixf:GetTracking('Product [Name == Laptop AND Brand == Dell AND _statusTracking==Delivered ]')"></xsl:value-of>{{/code}}
Outhman Moustaghfir 2.1 21
22 Searching by trkIDs :
23
24 {{code language="XML"}}
Outhman Moustaghfir 4.1 25 <xsl:value-of select="ixf:GetTracking('Product [ _trkID in '632061bef8aef457701a28d2;632061e5f8aef457701a28d3;63206213f8aef457701a28d4]')"></xsl:value-of>
Outhman Moustaghfir 2.1 26 {{/code}}
27
28 Set the limit value to get only 4 elements  :
29
30 {{code language="XML"}}
Outhman Moustaghfir 4.1 31 <xsl:value-of select="ixf:GetTracking('Product [Name == Laptop AND Brand == Dell AND _statusTracking==Delivered ]',4)"></xsl:value-of>
Outhman Moustaghfir 2.1 32 {{/code}}
33
34 Add an order by Country :
35
36 {{code language="XML"}}
Outhman Moustaghfir 4.1 37 <xsl:value-of select="ixf:GetTracking('Product [Name == Laptop AND Brand == Dell AND _statusTracking==Delivered ]',4,'Country')"></xsl:value-of>
Outhman Moustaghfir 2.1 38 {{/code}}
39
40 if you want to add an order without filling the limit, you must put 0 as a value to it :
41
42 {{code language="XML"}}
Outhman Moustaghfir 4.1 43 <xsl:value-of select="ixf:GetTracking('Product [Name == Laptop AND Brand == Dell AND _statusTracking==Delivered ]',0,'Country')"></xsl:value-of>
Outhman Moustaghfir 2.1 44 {{/code}}
45
This wiki is hosted and managed by iXPath
Powered by XWiki 13.3 debian