Hi,
Is there a way to format this table column amount to be a number with decimals?
This is the email that I received. I want all the number to have two decimals point.
Thanks
Solved! Go to Solution.
I think this error is occurring because some of your 'Tax Amount' values are empty and do not contain any values? For example:
{
"Client Name": "Alex Wilber",
"Email": "Alex@home.net",
"Vendor Name": "Safe Systems Ltd",
"Due Date": "2022-09-22",
"Tax Amount": ""
}
If this is the case, you can extend the expression to test for empty or missing values and return $0.00:
if(empty(item()?['Tax Amount']),'$0.00',formatNumber(float(item()?['Tax Amount']),'C2'))
Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.
There is a FormatNumber function that you can use. Here are some examples:
Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.
Hi Ellis,
I get an error. I don't really know how to resolve it. Could you please help?
The Tax Amount property is text. You will need to convert the the string into a number (float).
Please try:
formatNumber(float(item()?['Tax Amount']), 'C2')
Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.
Tried and unfortunately, it didn't work. Still getting error, any other possible option? thanks
I think this error is occurring because some of your 'Tax Amount' values are empty and do not contain any values? For example:
{
"Client Name": "Alex Wilber",
"Email": "Alex@home.net",
"Vendor Name": "Safe Systems Ltd",
"Due Date": "2022-09-22",
"Tax Amount": ""
}
If this is the case, you can extend the expression to test for empty or missing values and return $0.00:
if(empty(item()?['Tax Amount']),'$0.00',formatNumber(float(item()?['Tax Amount']),'C2'))
Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.
Thank you very much Ellis!, you are a genius! 🙂😀