I have a currency field but when I try to print it...
# advancedpdf
b
I have a currency field but when I try to print it in PDF ${record.custrecord_ci_amount} it shows me just number. To make things worse, if I output ${record.custrecord_ci_amount?string.currency} it shows nothing. Any help would be appreciated
p
Try
${nsformat_currency(record.custrecord_ci_amount)}
This should show the value in the correct currency format and symbol for the associated currency to the record - which I'm assuming there is? If the field type is already currency then I would expect this to carry through to the PDF but without further context I can't provide any additional comment.
b
just sec please
Thank you @PenguinsOfDoom
I also have Date field and Text Area field which has (<br> tag in it). But that Date field is shown as null
p
Do you have additional formatting on the date field?
b
${record.custrecord_due_date} which is Date field but it shows TZ string and if I print it ${record.custrecord_due_date?date} it shows nothing.
No
p
Have you tried the string built-in on this page with the format you want? https://freemarker.apache.org/docs/ref_builtins_date.html#ref_builtin_date_datetype
b
this one works though. ${.now?date}
yes
${.now?date}
this one works
p
I mean for that date field, e.g.
${record.custrecord_due_date?string["dd/MM/yy"]}
b
yes but it shows nothing
p
And without formatting it shows a string value?
b
without formatting it shows this value
2020-10-23T070000.000Z
p
And the field type is definitely Date or Date/Time?
b
Yes it's Date
p
Not certain, I can't think of any reason I've come across before why you would be having issues with these fields based on the information you've provided
Can you share the template code/output?