Changes for page GetTracking
Last modified by Outhman Moustaghfir on 2024/07/23 13:27
<
>
edited by Outhman Moustaghfir
on 2023/03/02 17:21
on 2023/03/02 17:21
edited by Outhman Moustaghfir
on 2024/07/23 13:27
on 2024/07/23 13:27
Change comment:
There is no comment for this version
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Parent
-
... ... @@ -1,1 +1,1 @@ 1 -iXPath V3.Func itons.WebHome1 +iXPath V3.Functions.XSLT .tracking.WebHome - Content
-
... ... @@ -4,16 +4,13 @@ 4 4 5 5 = Parameters = 6 6 7 -GetTracking uses 5params to help retrieve trackings in question.7 +GetTracking uses 4 params to help retrieve trackings in question. 8 8 9 9 1. xpathExpression: read the IXpathExpression for more details ([[IXpathExpression>>https://ixpath.app/xwiki/bin/view/iXPath%20V3/IXpathExpression/]]) 10 -1. keys: it can handle 2 values, "trkID" or keys separated by ';' (eg: 'orderNumber;City;Phone') if the key contains '_' at the first character, it means we look for metadata (_statusTracking, _creationDate ...) 11 -**NB:** all metadata will be explained in detail in another paragraph. 12 -1. values: the values must be ordered the same as 'keys'. if we're searching by 'trkID', 'values' should contain trkIDs separated by space ' '. eg : '121ee 123DD 55evr om432' 13 -In the other case where we use values depending on keys, they must be separated by ';' as shown below : 14 -if we take the last example in 'keys' param, 'orderNumber;City;Phone' , 'values' will be by example '1243;Paris;06070706053' . 15 -1. limit: it defines the max number of tracking to retrieve. **it's optional.** 16 -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 the limit value. 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'. 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) 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. 17 17 18 18 = Uses = 19 19 ... ... @@ -21,30 +21,35 @@ 21 21 22 22 if we want to get Product by key values 23 23 24 - {{code language="XML"}}<xsl:value-of select="ixf:GetTracking('Product ','Name;Brand;_statusTracking' , 'Laptop;Dell;Delivered')"></xsl:value-of>{{/code}}21 + {{code language="XML"}}<xsl:value-of select="ixf:GetTracking('Product [Name == Laptop AND Brand == Dell AND _statusTracking==Delivered ]')"></xsl:value-of>{{/code}} 25 25 26 26 Searching by trkIDs : 27 27 28 28 {{code language="XML"}} 29 -<xsl:value-of select="ixf:GetTracking('Product ','trkID','632061bef8aef457701a28d226 +<xsl:value-of select="ixf:GetTracking('Product [ _trkID € '632061bef8aef457701a28d2;632061e5f8aef457701a28d3;63206213f8aef457701a28d4]')"></xsl:value-of> 30 30 {{/code}} 31 31 32 -Set the limit value to get only 4 elements 29 +Set the limit value to get only 4 elements and fetch link 'Invoice' : 33 33 34 34 {{code language="XML"}} 35 -<xsl:value-of select="ixf:GetTracking('Product ','Name;Brand;_statusTracking' , 'Laptop;Dell;Delivered',32 +<xsl:value-of select="ixf:GetTracking('Product [Name == Laptop AND Brand == Dell AND _statusTracking==Delivered ]','Invoice',4)"></xsl:value-of> 36 36 {{/code}} 37 37 38 38 Add an order by Country : 39 39 40 40 {{code language="XML"}} 41 -<xsl:value-of select="ixf:GetTracking('Product ','Name;Brand;_statusTracking' , 'Laptop;Dell;Delivered',38 +<xsl:value-of select="ixf:GetTracking('Product [Name == Laptop AND Brand == Dell AND _statusTracking==Delivered ]','Invoice',4,'Country')"></xsl:value-of> 42 42 {{/code}} 43 43 44 -if you want to add an order without filling the limit, you must put 0 as a value to it : 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 : 45 45 46 46 {{code language="XML"}} 47 -<xsl:value-of select="ixf:GetTracking('Product ','Name;Brand;_statusTracking' , 'Laptop;Dell;Delivered',44 +<xsl:value-of select="ixf:GetTracking('Product [Name == Laptop AND Brand == Dell AND _statusTracking==Delivered ]','',0,'Country')"></xsl:value-of> 48 48 {{/code}} 49 49 47 +GetTracking with projection : 50 50 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}}