How to configure a number attribute using format

Hi, I’m trying to use the configuration option “format" (Formatting rules to be applied when converting the value to string representation for UI purposes (number of decimal places, boolean as on/off etc.) to change the attribute number of decimal places to 4.

The wiki guide points me to this link:

How do I use this to parse the data in json?

I’ve tried this with no success:

{
“maximumFractionDigits”: 4
}

Hi!

I just attempted to reproduce your issue, and found out it’s a bug in our system :wink:

The field accepts JSON based on the ValueFormat Java class.
So your format is correct, and written correctly.

It seems all other options like minimumFractionDigits work fine;

However, the maximumFractionDigits meta item does not seem to work;

I’ll create a GitHub PR to fix this issue, and link it here :+1:

Let me know if other issues arise! :wink:

I’ve created an GitHub issue for it;

Hi Martin,

Thanks! I’m now using maximumSignificantDigits which works fine and I’ll switch to maximumFractionDigits when the issue has been resolved.

No problem!

The issue has been resolved, and will be included in the next release.
We have no date on that yet, but I’m expecting it sometime next week. :wink: