on 11-25-2021 11:32 AM
Hello experts,
I have a problem with a simple editing of a number.
From my API response I get various numbers with different decimal lengths. I save the value I need to the memory field "i". So I want to format it to round it to two decimal digits. The decimal seperator is a dot, which is fine for me.
My attemend looks like this:
{{formatNumber memory.i 2}}
Somehow it's not working.
Do you have any ideas?
Thanks in advance!
Regards,
Lukas
In what format are you getting the number? When I save let's say a requirement to memory, I need to use the raw property:
{{formatNumber memory.mynumber.raw 2}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Daniel,
I recive it from an API, this is part of the answer:
"item1List": {
"contents": [
{
"ShortName": "Highlighter LUMINATOR Table 4-Set",
"Price": 11.7,
"Image": "pf00139596.jpg",
"SupplierName": "Office Supplies"
},
...
]}
I multiply the result (the price) by a number and save the value as "i". The number I'm getting earlier and it has the format you described (memory.quantity.scalar). So "i" should be the correct format.
Hi Daniel, If you let me ask I'll appreciate it!
How can I add format to API Response: {{api_service_response.default.body.value[0].NetSalesAmountLC_SUM}}
I'm using: {{formatNumber value decimalSeparator thousandSeparator}} but don't work, I have investigated a lot and have not found the same example that will serve me.
Many thanks for considering my request.
Erick Gómez
User | Count |
---|---|
65 | |
8 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.