This value should be smaller than 2147483648

0
I'm getting "This value should be smaller than 2147483648" as an error in my app. I'm debugging someone else's work. In the third loop of a set of nested loops, 1200 objects are being iterated over. It's this loop that fails. There's nothing in the logs. The error message simply pops up and says "This value should be smaller than 2147483648". Nothing crashes. I know that such nested loops are not ideal but it's not my work and I need to fix this. The 1200 objects are non-persistable. My first thought would be to batch them like so: https://world.mendix.com/display/howto40/Retrieve+and+manipulate+batches+of+objects But since this is a list of non-persistable objects, I can't select with limits and offsets. I don't know if there is a way for me to select a subset of these objects. The loop itself doesn't do that much. It filters, counts and sums objects before finally changing the iterator object. I can't see anything obvious that would cause this error. It works with smaller amounts of data so I think that's where the problem lies. Nothing should make it hit a value of 2147483648 though. Any suggestions would be appreciated.
asked
1 answers
5

In Mendix you two datatypes for numbers: 'Interger' and 'Long'. An Integer has a maximum value that can be set and that is 2.147.483.648. A Long has a max value of 9.223.372.036.854.775.807.

I don't know exactly what you are trying to do in your microflow, but I suggest you have to look over the sums aggregation. Check what if you do a sum aggregation that is larger that the Integer max value. If it breaks, it means that Mendix is aggregating based on an Integer instead of a Long. The best way is to specify a ticket in support.mendix.com so they can have a look at it.

answered