Is it possible to format floats? exemple 1 125 256.10

34 views
Skip to first unread message

Ahmed Amine Nair

unread,
Nov 2, 2021, 7:52:51 AM11/2/21
to Jam.py Users Mailing List
Hello, 
Is it possible to change the format of floats fied when displaying them, for example adding space after each 3 digits.

Example:  
1234.10 ===> 1_234.10 (_ represent space)
1125256.10 ===> 1 125 256.10

Regards.
Amine

Dražen Babić

unread,
Nov 2, 2021, 8:28:27 AM11/2/21
to Ahmed Amine Nair, Jam.py Users Mailing List
Sure
On Parameters/Language/Monetary thousands separator


Screenshot from 2021-11-02 20-26-22.png

--
You received this message because you are subscribed to the Google Groups "Jam.py Users Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jam-py+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jam-py/48581a34-da22-4167-a264-f8a8e05d35fcn%40googlegroups.com.

Drazen D. Babic

unread,
Nov 2, 2021, 8:31:50 AM11/2/21
to Jam.py Users Mailing List
Currency, not floats.

Ahmed Amine Nair

unread,
Nov 2, 2021, 10:29:04 AM11/2/21
to Jam.py Users Mailing List
Hi Babic, thanks for your reply.
Do you mean the Operation System parameters? because I couldn't find " Monetary thousands separator " in JamPy parameters' interface !!

Plus, how to do it for FLOAT type? 
I looked on the internet how to do it with CSS, but no luck.

Andrew Yushev

unread,
Nov 2, 2021, 3:28:17 PM11/2/21
to Ahmed Amine Nair, Jam.py Users Mailing List
Please see the video attached.
You can also write on_field_get_text event handler:


вт, 2 нояб. 2021 г. в 17:29, Ahmed Amine Nair <ahmedam...@gmail.com>:
lang.mp4

Ahmed Amine Nair

unread,
Nov 2, 2021, 4:28:10 PM11/2/21
to Jam.py Users Mailing List
Thanks for taking the time to record the video, I really appreciate it.
My sincere salutations

Zoi Moravec

unread,
Feb 16, 2026, 8:04:00 AM (13 days ago) Feb 16
to Jam.py Users Mailing List
Hi all !
I used this case with space thousands separator.
But there are bug (or feature8-)):
While use edit_form and set currency field "UnitPrice" to "20000" and press Enter, it field "UnitPrice" set to "20 000.00". It's OK.
But when i set focus to another field (or press ok-btn), field "UnitPrice" is change to "20.0".
You can reproduce this bug in Demo project for InvoiceTable with change UnitPrice value.
How can i fix it?)
вторник, 2 ноября 2021 г. в 23:28:10 UTC+3, Ahmed Amine Nair:

Dean D. Babic

unread,
Feb 16, 2026, 10:26:07 PM (13 days ago) Feb 16
to Jam.py Users Mailing List
I just changed Transaction to Float, see it here:
https://msaccess.pythonanywhere.com/
The Actual is stil Currency.
I see no issues with a focus. Let me know when to change back. Thx

Zoi Moravec

unread,
Feb 19, 2026, 1:14:46 AM (11 days ago) Feb 19
to Jam.py Users Mailing List
Dean, in your case "Actual" field is not edatable.
I will clarify the details of the bug occurrence. The video shows it. The bug occurs when the user presses Enter after entering a number in the field. At this point, the number is "normalized" to a thousand-separated value. And in this case that when changing focus (or saving), the number is cut off.
Look my video in Demo project. 

вторник, 17 февраля 2026 г. в 06:26:07 UTC+3, Dean D. Babic:
currency-thousand-separator.mp4

Dean D. Babic

unread,
Feb 19, 2026, 2:33:47 AM (10 days ago) Feb 19
to Jam.py Users Mailing List
Yes, but you are formating a FLOAT.
You've hit an architectual contraint imo.
Reply all
Reply to author
Forward
0 new messages