Skip to content
This repository was archived by the owner on Aug 23, 2025. It is now read-only.
This repository was archived by the owner on Aug 23, 2025. It is now read-only.

Rounded formatted values for categorical filter using numeric field with decimals. #79

@alexisHemeryWiiisdom

Description

@alexisHemeryWiiisdom

Introduction

When using a number field that contains float values as a categorical filter, its formatted values retrieved by the embedding API are rounded to the closest whole number.
Therefore, the value 0.2 would be retrieved with a formated value of "0".

Steps to reproduce

  1. Create a worksheet with a numeric field containing float numbers as a categorical filter.
  2. Open this worksheet with the embedding API.
  3. Retrieve the filter values using the getFiltersAsync function.

Observe behavior

For every decimal value, the formatted value is rounded to the closest whole number.

Example of response to this function call:
[ { "_worksheetName":"Sheet 1", "_fieldName":"Number", "_filterType":"categorical", "_fieldId":"[federated.1poa5fx09a7cjs14w0cif1kh08vf].[none:number:ok]", "_registryId":0, "_appliedValues":[ { "_value":7.2, "_nativeValue":7.2, "_formattedValue":"7" }, { "_value":1, "_nativeValue":1, "_formattedValue":"1" }, { "_value":0.5, "_nativeValue":0.5, "_formattedValue":"1" }, { "_value":null, "_nativeValue":null, "_formattedValue":"Null" } ], "_isExcludeMode":false, "_isAllSelected":false } ]

-> The returned formatted value is not the one displayed on the worksheet.
We observe that, for example, the value 0.5 became "1", same thing with the value 7.20 that became "7".

Note: We tried to change the "Format Number" on the filter from "Automatic" to "Number (custom) "with an explicit number of "Decimal Places", it does not solve the bug:

Image

Is this the normal behavior?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions