Issue with Data Sorting When Uploading to an Environment
0
Hi everyone, I'm encountering an issue when deploying my app to an environment, and I could use some help. In my app, I complete a questionnaire that generates a report. When running the app locally, the numbers in the report appear in a logical order by default. However, when I deploy the same app to an environment, the data is displayed in a random order. I attempted to apply custom sorting, which works correctly for numbers 1-9. However, once the numbers reach double digits, the sorting becomes incorrect—for example, Mendix interprets "10" as starting with "1," causing numbers like "10, 11, 12..." to appear before "2, 3, 4..." instead of following numerical order. Has anyone else encountered this issue? Any advice on how to enforce proper numerical sorting would be greatly appreciated! (Please see examples below) Thanks in advance. Environment - Local -
asked
Matthew Mooney
2 answers
0
Sorting where 10 is interpreted as starting with 1 happens when you use strings for sorting, this will not happen when using integers and then the sorting should be the same locally and on any other environment.
answered
Erwin 't Hoen
0
It is because the different databases;
In your local, you might be using HSQLDB and in cloud, it can be postgreSQL
So, to handle the issue, you might need to add an integer attribute to sort properly in your reports.