Significant zero management (Issue with String format: Leading zeros are being removed in the pivot grid)

Answered
emmanuel bocquet asked 3 days ago

Hello Flexmonster Team,

I am encountering an issue where leading zeros are automatically stripped from a specific column, even though it has been explicitly defined as a String.

The Issue: In my dataset, I have an identification column (ID/Serial Number) that contains values starting with zeros (e.g., "001245"). Despite forcing the data type to String in the mapping/schema configuration, the pivot table automatically treats these values as numbers and displays them without the leading zeros (e.g., 1245).

Could you please let me know if there is a specific property or a formatting option I should use to prevent this automatic conversion?

 

Best regards,

1 answer

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster 3 days ago

Hello, Emmanuel!

Thank you for reaching out to us.

Kindly note that Flexmonster by default tries to parse the numeric values from strings where possible. The recommended approach to have the leading zeroes in the ID field is to explicitly define the string datatype via mapping in Flexmonster: https://www.flexmonster.com/doc/mapping/.
We have prepared the example showing how to set the mapping in the dataSource object: https://jsfiddle.net/flexmonster/gwhovcyz/.

Could you please double-check the mapping configuration on your side using the provided example as a reference? If the mapping is set as in the example and the field is still displayed as a number, please modify our example so the case is reproducible on our side.

Looking forward to hearing from you.

Kind regards,
Solomiia

Please sign in or register to submit your answer