10
Views
7
Comments
Solved
How do I solve this pagination , JavaScript node error?
Application Type
Reactive

Hi, help please: I was following the reactive web tutorial on pagination and sorting. However, when I published and view in the browser this error pop up. Please see error message below. There was no error in 1-click publish and True change has OK - The module is valid. I am new to Outsystems and JavaScript. I will be grateful for any help received. 

Error message:

"Unable to convert Infinity to the Integer type since it exceeds the maximum value allowed which is 2147483647. Check the JavaScript node 'GetToltalPages' of the action 'InitPagination'. "

paginationerroredit.png

Rank: #4829
Solution

Hello Kurt,

this error message also appears if you forget to set a default value for the maxRecords variable.
So maybe you forgot to enter a number there? 

mvp_badge
MVP
Rank: #2
Solution

Hi Kurt,

If I had to guess, there's a division by zero or something somewhere. Did you use the pagination out of the box, or did you add some things yourself?


Rank: #6461
Solution

StartIndex and MaxRecords had the same variable (StartIndex) assigned to them. Startindex is set to (0) zero. As a result an error was thrown, fixed by reassigning maxRecords the correct variable. 

mvp_badge
MVP
Rank: #2
Solution

Hi Kurt,

If I had to guess, there's a division by zero or something somewhere. Did you use the pagination out of the box, or did you add some things yourself?


Rank: #4829
Solution

Hello Kurt,

this error message also appears if you forget to set a default value for the maxRecords variable.
So maybe you forgot to enter a number there?