Despite the COVID-19 outbreak, our team continues operating at full speed. We are always here to support and answer all your questions.

Feel free to reach out by filling this quick form.

Fill the form
Get Free Trial

Flat Form layout removes zeros from text

Answered
Adam Plumridge asked on September 21, 2020

Hello,
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:
https://dev551.mestec.net/

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

Attachments:
Flexmonster grid.png

1 answer

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster September 22, 2020

Hello,
 
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.
 
Regards,
Illia

Please login or Register to Submit Answer