Format a price
FreeLogic@rabbinatix/format-a-price by Rabbinatixupdated Oct 4, 2026
A price as text with a currency sign, 2 decimals and thousands separators, such as €1,234.50.
Format Number writes the amount; Format puts the sign in front. For the European style (1.234,50 €), set Thousands to "." and Point to "," on the Format Number node, and change the template to {amount} {symbol}.
Shows: Format Number, Format.
How to use it
Add it to your logic, then add a Call Function step in any logic and pick Format a price. It belongs to no system, so every system can use it. Or download the TypeScript and call it from your own code.
Inputs
amount: Number
symbol: Text
Outputs
text: Text
Previewdrag the steps around; scroll to zoom
Function Entry, Input / output. 0 inputs, 3 outputs. step 1 of 4
Format a price
amount
symbol
Format Number, String. 4 inputs, 1 output. step 2 of 4
Format Number
value
decimals
thousands
point
result
Format, String. 2 inputs, 1 output. step 3 of 4
Format "{symbol}{amount}"
symbol
amount
result
Return, Input / output. 2 inputs, 0 outputs. step 4 of 4
Return
text
Arrow keys: next or previous step in flow order. Alt with arrows: nearest step in that direction. Enter: open. Shift F10: more actions.
Examplesrun live against the logic · 2/2 pass
| Passed | Example | Input | Output |
|---|---|---|---|
| Thousands | {"amount":1234.5,"symbol":"€"} | {"text":"€1,234.50"} | |
| Zero | {"amount":0,"symbol":"$"} | {"text":"$0.00"} |
Try it
Versions
In this package
Format a price (entry)
