aj_bk
aj_bk

Reputation: 194

Freemarker parameter doesn't know what it is

I have a source from the reportTest area. I don't know if I'm allowed to show it but it kinda looks like this:

 (reportTests.test_thing.view_moreThings["adjustedIssuePrice"])

now this parameter IS a number! but for some reason it doesn't know that. I tried "?eval" , "?number"...nothing. I can to basic mathematics on the parameter but I not when I call it (and I need to call it) did anyone encounter something like this before?

enter image description here

this is what i get

Upvotes: 0

Views: 49

Answers (1)

ddekany
ddekany

Reputation: 31122

That thing isn't a number, but a String, as the error message says. Just because a string looks like a number for a human, it's not a number as far as most computer languages are concerned. The recommended solution is to improve that data-model so that it uses a number (like an Integer or BigDecimal, typically) instead of String there. If that's not feasible, then ?number should work (like ${foo.bar * bundle.UNITS_CALC_NEW_TOTC?number}). What error message do you get with it?

Upvotes: 1

Related Questions