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 5.1 10 1. fetchLinks : for optimization, you can choose the links you would like to fetch by sending the links needed separated by ';' , if your xpathExpression contains already the link, it can bypass this param. If you want to fetch all links - which is not recommended - you can put the value '$ALL'.
Outhman Moustaghfir 3.2 11 1. limit: it defines the max number of tracking to retrieve. **it's optional. **(Optional)
12 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)
Outhman Moustaghfir 10.1 13 1. includeKeys: This parameter specifies the keys to be fetched. If it is null or empty, all keys will be fetched. keys are separted by ";" and if we want to fetch keys in subTracking we can use this expression for example '**SubTrk.SubTrkLevel2.subTrkLevel3.key'.** This parameter is optional.
Outhman Moustaghfir 2.1 14
15 = Uses =
16
17 We suppose that we have a tracking type named Product. It has 3 data (Name, Brand, and Country).
18
19 if we want to get Product by key values
20
Outhman Moustaghfir 4.1 21 {{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 22
23 Searching by trkIDs :
24
25 {{code language="XML"}}
Outhman Moustaghfir 7.1 26 <xsl:value-of select="ixf:GetTracking('Product [ _trkID € '632061bef8aef457701a28d2;632061e5f8aef457701a28d3;63206213f8aef457701a28d4]')"></xsl:value-of>
Outhman Moustaghfir 2.1 27 {{/code}}
28
Outhman Moustaghfir 5.1 29 Set the limit value to get only 4 elements and fetch link 'Invoice' :
Outhman Moustaghfir 2.1 30
31 {{code language="XML"}}
Outhman Moustaghfir 5.1 32 <xsl:value-of select="ixf:GetTracking('Product [Name == Laptop AND Brand == Dell AND _statusTracking==Delivered ]','Invoice',4)"></xsl:value-of>
Outhman Moustaghfir 2.1 33 {{/code}}
34
35 Add an order by Country :
36
37 {{code language="XML"}}
Outhman Moustaghfir 5.1 38 <xsl:value-of select="ixf:GetTracking('Product [Name == Laptop AND Brand == Dell AND _statusTracking==Delivered ]','Invoice',4,'Country')"></xsl:value-of>
Outhman Moustaghfir 2.1 39 {{/code}}
40
Outhman Moustaghfir 5.1 41 if you want to add an order without filling the limit and the fetchLink params, you must put 0 as a value to it :
Outhman Moustaghfir 2.1 42
43 {{code language="XML"}}
Outhman Moustaghfir 5.1 44 <xsl:value-of select="ixf:GetTracking('Product [Name == Laptop AND Brand == Dell AND _statusTracking==Delivered ]','',0,'Country')"></xsl:value-of>
Outhman Moustaghfir 2.1 45 {{/code}}
Outhman Moustaghfir 6.1 46
47 GetTracking with projection : 
48
49
50 {{code language="XML"}}
51 <xsl:value-of select="ixf:GetTracking('Product [Name == Laptop AND Brand == Dell AND _statusTracking==Delivered ]/Processors')"></xsl:value-of>
52 {{/code}}
This wiki is hosted and managed by iXPath
Powered by XWiki 13.3 debian