OriginalPostID-157746
Discussion posts and replies are publicly visible
HI ashleyb
Yes it can be done.
But by looking at your code, I would suggest you to pass the variables in to the expression rather than accessing the parent variable with out passing as a parameter. This is the best practice and it give more readability and maintainability to the code.
Once you have the first two CDTs populated using the rules construct a new CDT using 'type' construct and map the desired value and return the newly created CDT from the expression.
for ex:
local!firstCDT : rule!CAC_getExceptionByIDAndNotStatus(ri!crsExceptionID, "Cleared"), local!secondCDT : rule!CAC_getCRSExceptionCollateralByActivityIdAndCollateralCode(ri!cacData.activityID, ri!cacData.typecode), local!returnCDT: 'type!{yourcdtnamespace}yourCDTname'(firstEle : local!firstCDT.ActivityId_Int,secondElement: local!secondCDT.LoanNbr_Int),
Regards
Suresh