GetTracking
Version 3.2 by Outhman Moustaghfir on 2023/03/02 17:23
Introduction
In this section, we will go throw an XSL function to get trackings by trkID or using Keys/Values.
Parameters
GetTracking uses 4 params to help retrieve trackings in question.
- xpathExpression: read the IXpathExpression for more details (IXpathExpression)
- limit: it defines the max number of tracking to retrieve. it's optional. (Optional)
- 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)
- projection: you can return only some wanted fields instead of fetching the integrity of tracking object. (Optional)
Uses
We suppose that we have a tracking type named Product. It has 3 data (Name, Brand, and Country).
if we want to get Product by key values
<xsl:value-of select="ixf:GetTracking('Product', 'Name;Brand;_statusTracking' , 'Laptop;Dell;Delivered')"></xsl:value-of>
Searching by trkIDs :
<xsl:value-of select="ixf:GetTracking('Product', 'trkID' , '632061bef8aef457701a28d2 632061e5f8aef457701a28d3 63206213f8aef457701a28d4')"></xsl:value-of>
Set the limit value to get only 4 elements :
<xsl:value-of select="ixf:GetTracking('Product', 'Name;Brand;_statusTracking' , 'Laptop;Dell;Delivered' , 4)"></xsl:value-of>
Add an order by Country :
<xsl:value-of select="ixf:GetTracking('Product', 'Name;Brand;_statusTracking' , 'Laptop;Dell;Delivered' , 4, 'Country')"></xsl:value-of>
if you want to add an order without filling the limit, you must put 0 as a value to it :
<xsl:value-of select="ixf:GetTracking('Product', 'Name;Brand;_statusTracking' , 'Laptop;Dell;Delivered' , 0, 'Country')"></xsl:value-of>