I have some detail tables inside my data mapper and template.
For example I have ServiceDetails and inside this ServiceDetail I have other Detail.
I would like to access Detail fields from templaye script to perform some acction.
He always return last value or first, value, I dont know which index pass into this script to work for current detail record. Please help
var field, result = "";
var asterisks = “”;
var serviceDetail = record.tables.detailS;
var innerDetail = serviceDetail.tables.detailDetails;
var tax = innerDetail.fields.Tax;
logger.info("tax " + tax);
var noChargePerContract = innerDetail.fields.NoChargePerContract;
logger.info("noChargePerContract " + noChargePerContract);
if(noChargePerContract.toUpperCase() == “Y” || tax < 0)
asterisks = “**”;
asterisks = “*”;