Help

Re: convert currency to string while preserving format

2990 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Mark_Newton
6 - Interface Innovator
6 - Interface Innovator

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?

2 Replies 2
AirOps
7 - App Architect
7 - App Architect

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.

Cherry_0-1673631005655.png

I hope this helps!

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,