🍉 Meet Flexmonster Pivot Table & Charts 2.9.Check out all the hot features!
Get Free Trial

Flat Form layout removes zeros from text

Adam Plumridge asked on September 21, 2020

If I have zeros at the start of text, they are removed when I switch to flat form view. I have attached a picture with highlighted values. When in classic form ‘Product Name’ is 00694.0006 however when I switch to flat form ’00’ are removed from product name. I need that the text stays the same in all layout views and also in all exports.
Can anyone please have a look and provide me a solution for this? Thank you.
I am using Flexmonster v.2.8.12 for JSON data sources.
The issue can be reproduced on the following page:

Username: **********
Password: **********

Flexmonster grid.png

1 answer

Illia Yatsyshyn Illia Yatsyshyn Flexmonster September 22, 2020

Thank you for reaching out to us.
In case the field’s data type is not explicitly defined, Flexmonster tries to infer its type automatically. In its turn, JavaScript allows defining numbers with leading zeros. As a result, when placing the “Product Name” hierarchy to measures or switching to the flat form, the field’s numeric value is displayed instead of a string.
We suggest defining the data type of the “Product Name” field as string. It is achievable using the Mapping property of the Data Source Object.
Please see the JSFiddle demonstrating the described approach.
Please let us know if it works for your case.
Do not hesitate to contact us in case any further questions arise.

Please login or Register to Submit Answer