Writer: How to format user field

I’ve tried to make a field formatted with “# ###,00”.

I’ve chosen “User Field”, entered name, set value to 12345,67, selected
-1 234,57 in Format list, pressed Apply and Insert button. It shows “12345,67” while should be “12 345,67”.

I’ve double clicked field and it shows “Standart” format. I’ve changed value to “12345.67” set format again, pressed Apply. It shows “0”.

Somehow it

How it should be formatted if I’m going to fill value from API?

(Slightly edited by @Lupp for disambiguation.)

You are using a “comma-locale”. Which one?
Your version of LibO?
Did you select a previously user-defined NumberFormat or a predefinded one - one related to your locale?
I couldn’t reproduce your issue with V6.4.4, UI=en-GB, Locale = en-GB, DocumentLanguage = de-DE.
I wouldn’t expect your TextField was inserted into the Header or Footer of any PageStyle of your document.
If so, however, it would be afflicted in the respective way by bug tdf#133459 .

Can’t format either with user-defined format when it differs too much from built-in ones.

This may the same problem as in Why doesn't Writer remember my custom-format date field? (Footer, Header). @Lupp submitted bug report tdf#133459.

I use 6.4.4 with ru_RU locale on Windows.

I added a respective comment to the tdf#133459 I reported yesterday.
@ajlittoz: Before saving my testdocument I didn’t experience the issue under discussion here, except for the unauthorized replacement of a U+2005 space as the group separator by an ordinary space.
I remember having been surprised again and again by observing situations where the same task performed the same way by the user had different effects depending on the context (document class e.g.) and thus looks as if internally managed by different routines Why?

@OlegShtch: The reason for what I doubt if your issue is closely related to the mentioned bug is, that you reported it (afaik) independent of the Header/Footer context.
Might you provide a very reduced example showing the issue for you in a typical situation?

@Lupp: I just inserted a user field in the first paragraph of a document, gave it a name and value 12345.67 (with locale adaptation for dot/comma decimal separator). I then tried to use various formats similar to @OlegShtch’s. When a format is considered “faulty”, the field displays as 0.

I somehow managed to get it to work by clicking on field in the text and setting format here.