Very odd, last week time I try it didn't work at all, but I try again to this time to see how if I made a mistake. Manage to get one of the formula working. But where did I go wrong? Does it only work if it a Parent field?
Here some screenshot for better visualization.
Announcement
Collapse
No announcement yet.
Email template, a float number with 5 decimal places is rounded to 2 decimal places
Collapse
X
-
It works 100%. {{numberFormat fieldName_RAW decimals=5}}
Parent field should be filled.
Leave a comment:
-
I suppose you could always try to see if you can reproduce on the demo server. Since I got free time I decide to give it a test on demo server. You are absolute right, none of the code I test worked (it currently under Contact if you want to give it a tweak or test before server reset).
As usually I spam various code hoping one would work. Basically none of them worked, not sure why. Even the simple code did not work properly.
Maybe you can report it as a bug(?).
Code:{{floatTest_RAW}} {{Contact.floatTest_RAW}} {{numberFormat floatTest_RAW decimals=3}} {Contact.floatTest} //even this one didnt work {{Contact.floatTest}} {{numberFormat Contact.floatTest_RAW decimals=3}}
Last edited by esforim; 06-26-2020, 08:43 AM.
Leave a comment:
-
I have version 5.9.3
Yes, I updated the fields before loading the template. When placeholder {{Analytics.entryPriceA_RAW}}, I didn’t have any data at all, an empty place in the letter.
Leave a comment:
-
sobolevfff Be careful if you use formula, you might get outdated info (in certain circumstances). Because formula will only activate after you Save or Modified a record.
In relation to yuri Email template, I haven't tested it but did you update the field name to be right? Yuri wrote a generic one and not really relate to your field name. Secondly are you on version 5.9.0 or higher?
Anyway yours would look like this:
{{entryPriceA_RAW}}
or possibly:
{{Analytics.entryPriceA_RAW}}
That "ParentsRecord" may also be giving you that "Not working" issue.Last edited by esforim; 06-26-2020, 08:08 AM.
Leave a comment:
-
Originally posted by yurikuzn View PostAs an option (only from 5.9.0):
{{entryPlaceA_RAW}}
or
{{numberFormat entryPlaceA_RAW decimals=5}}
Leave a comment:
-
Thanks for the help!
I created a new field with the formula entryPriceAS = number\format(entryPriceA, 5);.
When loaded into the email template everything works fine.
- Likes 1
Leave a comment:
-
As an option (only from 5.9.0):
{{entryPlaceA_RAW}}
or
{{numberFormat entryPlaceA_RAW decimals=5}}
Email templates support handlebars (same as pdf) but for a parent record.
Leave a comment:
-
I wrote a lengthy post but lost the post so I will be lazy with this post. Here how I did it with my formula, not sure if you can adopt it for email template or not:
number\round(Analytics.entryPriceA, 5);
Also refer to this if it help: https://docs.espocrm.com/administrat.../#numberformat
Leave a comment:
-
Email template, a float number with 5 decimal places is rounded to 2 decimal places
I have a "float "number with 5 decimal places. When I upload it to an email template, it is rounded to 2 decimal places. It is important for me to have exactly 5 decimal places because this is the price of the quote and accuracy is very important.
Already looked at all PHP files where there is "round", but did not find which function is responsible for loading data into a placeholder of Email Template
Help me, please. How to fix it?
У меня есть числа "float" с 5 знаками после запятой. Когда я загружаю их в шаблон электронной почты, то они округляются до 2 знаков после запятой. Для меня важно именно 5 знаков после запятой, потому что это цена котировки и точность здесь очень важна.
Уже пересмотрел все PHP-файлы, где есть "round", менял тупо 2 на 5, но эффекта нет, не нашел, какая функция отвечает за загрузку данных в плейсхолдер шаблона электронной почты.
Помогите мне, пожалуйста. Как это исправить?2 PhotosLast edited by sobolevfff; 06-25-2020, 08:45 PM.Tags: None
Leave a comment: