In XXX.cfc file.,
var SCOPE = structNew();
var result = structNew();
result['completeDate'] = iif( LEN(SCOPE.inductionKeyInfo.inductionCompleteDate) GT 0, "SCOPE.inductionKeyInfo.inductionCompleteDate", javaCast( "null", "" ) );
Sometimes, result['completeDate'] returns null though LEN(SCOPE.inductionKeyInfo.inductionCompleteDate) GT 0 is true.
I found another way of doing it,
result['completeDate'] = LEN(SCOPE.inductionKeyInfo.inductionCompleteDate) ? SCOPE.inductionKeyInfo.inductionCompetentDate : javaCast( "null", "" );
But wondering which one is the best way of doing it?
Could anyone please help me if you find any issues here?
Thank you in advance!!