Hi Everyone,
Hope you are doing well, Today we are going to see how we can fetch data from LIST B based on LIST A item value.
Following is use case:
Hope you are doing well, Today we are going to see how we can fetch data from LIST B based on LIST A item value.
Following is use case:
- List A, It's a list employee with employee ID
- List B, It's a list of some external system which have list of data fetched on List A employee ID.
- List C, This list will be a combination of List A and List B data.
- We are going to use one loop in XSLT and for every employee ID we will fetch data from List B with out any nested loop.
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0">
<xsl:param name="List2.outputPart"/>
<xsl:param name="GetEmployee_ManagerId_OutputVariable.outputPart"/>
<xsl:template match="/">
<ns0:ListData3>
<xsl:for-each select="/ns0:PsftIdmEmpContractorsCollection/ns0:PsftIdmEmpContractors">
<xsl:variable name="EmpID" select="ns0:emplid"/>
<ns0:PsftIdmEmpContractors>
<ns0:userid>
<xsl:value-of select="$List2.outputPart/ns1:getDataResponse/searchResultEntry[attr[@name='employeenumber']/value=$EmpID]/attr[@name='orclmtuid']/value"/>
</ns0:userid>
</ns0:PsftIdmEmpContractors>
</xsl:for-each>
</ns0:ListData3>
</xsl:template>
</xsl:stylesheet>
Comments
Post a Comment