Jan 12, 2023 07:15 AM - edited Jan 12, 2023 03:19 PM
Hi all,
If I have a number field formatted as currency, and I convert it to a string with a formula like this:
{unit price}&""
it drops all non-zero decimal places as well as the dollar sign, so $7.00 becomes 7. Is there any way to convert to a string with the 2-decimal format intact?
Jan 13, 2023 09:30 AM
Hi Mark,
Thank you for posting! It sounds like your currency data is stored in a text field currently. Is that correct?
Normally, we encourage clients to use the currency field type in Airtable. You can configure the number of decimal places you want in that currency field.
I hope this helps!
Jan 13, 2023 10:00 AM
Thanks Cherry, but yes it is stored as a number formatted as currency in it's original field. The reason I ask about converting to a string is that my problem goes quite a bit deeper. I have a Page Designer document that prints all lines linked to a parent-level purchase order. To do this I lookup the linked currency data, which comes a cross as an array. I then use this formula to create the field that Page Designer prints to my document:
SUBSTITUTE(ARRAYJOIN({Unit Price}), ",", "\n")
The problem is that ARRAYJOIN necessarily converts it to a string and my formatting is lost. See the attached picture for the results on my PO document. I'm using another field altogether just to get the dollar signs to print.
Cheers,