srhaque Posted December 9, 2018 Share Posted December 9, 2018 The report environment is obviously not the right place to perform complex logic, but when needs must the lack of lambda support in the available JS and troubles getting java 8+ working make a solution desirable. This technique worked for me, and I thought it might be of interest:<textFieldExpression><![CDATA[ (function () { var a = new Object($F{top}.get("buss")); var b = ...; for (var p in a) { b.push(a[p]); } return ...; } ).apply()]]></textFieldExpression>[/code]Notice the use of a "for" loop and temporary "var"s! This works because the "()" around the "function () {}" turns the declaration into an expression, which ".apply()" can run.Enjoy responsibly... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now