# Errors for decimal formats: data import, decimal comma

**URL:** <https://the.fmsoup.org/t/errors-for-decimal-formats-data-import-decimal-comma/4492>\
**Category:** Floating Topics\
**Tags:** calculations\
**Created:** [November 24, 2024, 10:47am UTC](https://the.fmsoup.org/t/errors-for-decimal-formats-data-import-decimal-comma/4492 "2024-11-24T10:47:22Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![traut](https://avatars.discourse-cdn.com/v4/letter/t/f475e1/32.png) [@traut](https://the.fmsoup.org/u/traut)\
**Post date:** [November 24, 2024, 10:47am UTC](https://the.fmsoup.org/t/errors-for-decimal-formats-data-import-decimal-comma/4492/1 "2024-11-24T10:47:22Z")

</div>

Hi,  
I have set some fields from import and calculation.

The system setting number format on macOS is 1.234,56 - decimal comma

However, the number fields act strangely and do read 123,4 as 1234. So does the index. When I use a "replace field content" by myField+0, it becomes 1234. But when I edit the field manually and add e.g. a space, the 123,4 then is read as 123,4.

But when I use a replace by trim(myfield&" "), it remains 123,4, indexed as 1234.

Same for substitute("," ; ",")

So what's wrong here? Why doesn't FMP handle decimal numbers properly, how did it get confused and how do I unconfuse it?

I checked the "," - it actually is hex 2c.  
It doesn't make any difference whether I tick or untick the menu command format -\> use system formats

---

<div class="post-metadata">

**Author:** ![traut](https://avatars.discourse-cdn.com/v4/letter/t/f475e1/32.png) [@traut](https://the.fmsoup.org/u/traut)\
**Post date:** [November 24, 2024, 10:57am UTC](https://the.fmsoup.org/t/errors-for-decimal-formats-data-import-decimal-comma/4492/2 "2024-11-24T10:57:57Z")

</div>

When I export as e.g. csv, the 123.4 is exported as 1234

The only working solution seems to be a scripted loop to add a space to that field - but there are several fields where this would be required and it feels like a terrible woekaround.

So is that an actual FMP bug?

Claris FileMaker Pro, Version 20.3.201 (12-19-2023).  
...and I feel that this 12-19-2023 is a system bug, too and should either read as 2023-12-19, 12/19/2023 or 19.12.2023...

---

<div class="post-metadata">

**Author:** ![traut](https://avatars.discourse-cdn.com/v4/letter/t/f475e1/32.png) [@traut](https://the.fmsoup.org/u/traut)\
**Post date:** [November 24, 2024, 11:04am UTC](https://the.fmsoup.org/t/errors-for-decimal-formats-data-import-decimal-comma/4492/3 "2024-11-24T11:04:06Z")

</div>

![Screenshot 2024-11-24 at 12.02.43](https://canada1.discourse-cdn.com/flex030/uploads/fmsoup/original/2X/a/ad433ea024fae9007539b6e11eae5ded4b678570.png)  
here's an image of the field's index

---

<div class="post-metadata">

**Author:** ![traut](https://avatars.discourse-cdn.com/v4/letter/t/f475e1/32.png) [@traut](https://the.fmsoup.org/u/traut)\
**Post date:** [November 24, 2024, 11:09am UTC](https://the.fmsoup.org/t/errors-for-decimal-formats-data-import-decimal-comma/4492/4 "2024-11-24T11:09:57Z")

</div>

Field format on the layout had been "general".

When I change it to decimal, separators " System Settings" it does show 123,4 as 1.234

 ![Screenshot 2024-11-24 at 12.05.47](https://canada1.discourse-cdn.com/flex030/uploads/fmsoup/original/2X/d/d920b00ee3d3f465adaa29efc2feaeaa327cf4a0.png)

264,1 is when I select the field, how the actual content looks like. But obviously it's indexed as 2641 and displayed with the thousands separator as 2.641

---

<div class="post-metadata">

**Author:** ![mipiano](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/mipiano/32/1074_2.png) [@mipiano](https://the.fmsoup.org/u/mipiano)\
**Post date:** [November 24, 2024, 12:19pm UTC](https://the.fmsoup.org/t/errors-for-decimal-formats-data-import-decimal-comma/4492/5 "2024-11-24T12:19:35Z")

</div>

What separator do you get when you calculate 4/3 in the DataViewer?

---

<div class="post-metadata">

**Author:** ![traut](https://avatars.discourse-cdn.com/v4/letter/t/f475e1/32.png) [@traut](https://the.fmsoup.org/u/traut)\
**Post date:** [November 24, 2024, 12:49pm UTC](https://the.fmsoup.org/t/errors-for-decimal-formats-data-import-decimal-comma/4492/6 "2024-11-24T12:49:35Z")

</div>

Why the Data Viewer? I use that one for script debugging only.

Replace Field Contents. with the calculation =4/3 returns 1,33333, no surprise here

 ![Screenshot 2024-11-24 at 13.47.41](https://canada1.discourse-cdn.com/flex030/uploads/fmsoup/original/2X/d/dceef918f7da2d92297d7163c16b841c5e62d03e.png)

---

<div class="post-metadata">

**Author:** ![traut](https://avatars.discourse-cdn.com/v4/letter/t/f475e1/32.png) [@traut](https://the.fmsoup.org/u/traut)\
**Post date:** [November 24, 2024, 1:02pm UTC](https://the.fmsoup.org/t/errors-for-decimal-formats-data-import-decimal-comma/4492/7 "2024-11-24T13:02:04Z")

</div>

I feel I'm just stuck in some stupid error here, too. I guessed it might have been because of fields operating on their own. So I now have created a sample test database and split everything to different fields. And it still fails to work...

So the task is: I have a FMP database and I want to import values, based on a matching ID.

The import table looks like

| 1 | 12,34x10x10,0 |
| --- | --- |
| 2 | 12x10x20,0mm |
| 3 | 12,3mm\*23,4mm\*34,5mm |

The first column is the ID. The second column are dimenstions X_Y_Z (or B_H_T Breite, Höhe, Tiefe or W_L_D, width, length, depth).

The last row (or record) is 12,3 mm multiplied with 23,4 mm, multiplied with 34,5 mm. This web forum here does read the asterisk as a special formatting character. Let's try to fix that... I guess it looks ok with the ecape character backslash before - but if not, that's why I explain it here

All I want to to is to split that to the table

| ID | X | Y | Z |
| --- | --- | --- | --- |
| 1 | 12,34 | 10 | 10,0 |
| 2 | 12 | 10 | 20,0 |
| 3 | 12,3 | 23,4 | 34,5 |

I had preferred to update/import directly to the number field X. But if it does not work on itself, import could be done to a text field XYZ.

I wonder where my stupid mistake has happened...

---

<div class="post-metadata">

**Author:** ![bdbd](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/bdbd/32/620_2.png) [@bdbd](https://the.fmsoup.org/u/bdbd)\
**Post date:** [November 24, 2024, 2:09pm UTC](https://the.fmsoup.org/t/errors-for-decimal-formats-data-import-decimal-comma/4492/8 "2024-11-24T14:09:51Z")

</div>

How numbers are read from text has nothing to do with how numbers are displayed in fields. Your system's settings determine how numbers are read from text.

It would help to know the calculation used to split the XYZ values into numbers.
