patan
3 years agoNew Contributor III
I am trying to perform a lookup and extend the object using the expression library
I wanted to perform a extend by performing a lookup using the expression library and it is giving me “this.comparator is undefined” error.
Below is my expression Library Content:
{
embedbusinessUnit: x => x.extend({"Demo":this.comparator[0]}),
embedbusinessUnit1: x => x.merge(this.comparator[0]),
"comparator": [
{
"KSCHL": "EPE",
"VKORG": "1000",
"BusinessType": "E",
"KSCHLN": "LPE",
"VKORGN": "1000"
},
{
"KSCHL": "EP0",
"VKORG": "RG",
"BusinessType": "N",
"KSCHLN": "LP0",
"VKORGN": "1000"
}
]
}
When I access the lib.businessUnitExpr.embedbusinessUnit($) gives me a comparator undefined error.
But when I access lib.businessUnitExpr.embedbusinessUnit1($) then it is able to identify the comparator
Any help would be appreciated.
BusinessUnitComparator.expr (382 Bytes)