First record in json defining column format

Answered
Nathan asked on April 16, 2018

It would appear that the first record in the json that I am sending is setting the column format.  So when it for example is 3453 it makes everything a number even thought the second record is 45-323 or third record is MS24693-C53 which makes a mess of the information.
Is there no way to set it to look at more than the value of the first JSON as it seems like a big assumption for it to just use the first value?

3 answers

Public
Dmytro Zvazhii Dmytro Zvazhii Flexmonster April 17, 2018

Hello Nathan,
Thank you for writing. Yes, you are right, when the component defines types automatically it sets the type of the first member for the column. However, there is an alternative approach. You can define the data types explicitly in the JSON meta object. Please find more information about this feature in our documentation: https://www.flexmonster.com/doc/managing-data-presentation-json.
Let us know if it works for you.
Regards,
Dmyrto

Public
Nathan April 17, 2018

Are there any plans to improve this approach as it basically means we have to always define the format otherwise like in this case there is a chance that it could mess things up?

Public
Tanya Gryshko Tanya Gryshko Flexmonster April 18, 2018

Hello, Nathan,
Thank you for your reply.
Currently, the best approach for handling the data types in JSON correctly requires defining the data types explicitly.
Our development team will take into account your feedback when planning future pivot table improvements.
Regards,
Tanya

Please login or Register to Submit Answer