Only string attributes available for e-mail tokens?

1
Hi, we're trying to show a decimal value in the body of an e-mail through the use of a token in the e-mail template. It appears this value will not be shown since it is not a string attribute. At least that is our conclusion from a look at the java-action ReplaceToken. However, this question has not been posted on this forum, and the string-limitation is never mentioned in the forum or in the documentation, nor validated when configuring a token in the e-mail template. So perhaps we're missing a really obvious way to use non-string attributes in tokens. Any help will be appreciated.
asked
2 answers
1

Like Nikel said the intention of the module is that it supports all attributes and tries to render it according to the users local (so with the correct date and decimal notation).

However the Model Reflection module has not yet been updated to 5.20, therefore it does not support decimal attributes yet. Any other attribute will be processed correctly. I'd recommend entering a ticket to upgrade ModelReflection to 5.20 to allow for support of the latest features such as the decimal attribute.

Until this module is upgraded to the latest version the workaround suggested by René can work for you.

answered
1

The best way to be sure would be to test this, which I haven't really.

But looking at the Java code for the version of MxModelReflection I am using (which I am sure is the latest or the second latest version), TokenReplacer.replaceToken(...) calls DataParser.getStringValue(...), which in turn does a best effort conversion of whatever the original object was to a String.

So judging from the code, the intended behaviour is that you can use any attribute and it should be converted to a String. If it doesn't do that, report a bug for MxModelReflection.

answered