# Automatically add decimal placements in WeWeb?

**URL:** <https://community.weweb.io/t/automatically-add-decimal-placements-in-weweb/3298>\
**Category:** Ask us anything\
**Tags:** formulas, xano\
**Created:** [June 30, 2023, 5:51pm UTC](https://community.weweb.io/t/automatically-add-decimal-placements-in-weweb/3298 "2023-06-30T17:51:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![brandon](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/brandon/32/2804_2.png) [@brandon](https://community.weweb.io/u/brandon)\
**Post date:** [June 30, 2023, 5:51pm UTC](https://community.weweb.io/t/automatically-add-decimal-placements-in-weweb/3298/1 "2023-06-30T17:51:48Z")

</div>

I have an API from Xano that returns prices for products as a decimal field. Here is a sample list:

- 229.99
- 199.98
- 349
- 522.87

On the front-end, I would like all of the prices to be displayed in the same decimal format, meaning that the 349 value should be displayed as 349.00.

In Bubble I could just select the value output as a currency and then add a decimal place of “2” and it formatted it all perfectly. But I can’t figure out a formula in WeWeb to accomplish this. Is this possible or will I need to take care of the formatting on the Xano side?

![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/6/6a41a5768a2c3277d2e10d9356e27af46bd5590a.png)

BONUS QUESTION: Is it also possible for WeWeb to separate thousands by a comma?

```auto
1999

```

Becomes

```auto
1,999

```

---

<div class="post-metadata">

**Author:** ![jaredgibb](https://avatars.discourse-cdn.com/v4/letter/j/ecd19e/32.png) [@jaredgibb](https://community.weweb.io/u/jaredgibb)\
**Post date:** [July 1, 2023, 4:14pm UTC](https://community.weweb.io/t/automatically-add-decimal-placements-in-weweb/3298/2 "2023-07-01T16:14:00Z")

</div>

If you’re going to do it in more than 1 place, I’d create a formula that takes the numeric input and spits out a string representation of the numeric value.

I’d most likely be using a js manipulation in the formula

---

<div class="post-metadata">

**Author:** ![Dorian](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/dorian/32/13183_2.png) [@Dorian](https://community.weweb.io/u/Dorian)\
**Post date:** [July 1, 2023, 9:51pm UTC](https://community.weweb.io/t/automatically-add-decimal-placements-in-weweb/3298/3 "2023-07-01T21:51:29Z")

</div>

I solved this using co-pilot which created some custom JS for me. I couldn’t figure out a no-code way to do it.
