286
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
2020-09-15 13-07-23
Kilian Hekhuis
 
MVP
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?


UserImage.jpg
Kurt Allen

Hi Kilian: Well,  the exercise required a manual build for the pagination which I followed step by step. However, you might be on to something as I did set some values to 0 (zero). I will retrace my step. Please give me a few minutes to share my findings. 


UserImage.jpg
Kurt Allen

Hi Kilian: Thanks. You were right! I found the old bugger. I accidentally assign the wrong value to the maxRecords, startIndex is set (0) zero.

paginationerrorsolveedit.png
2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Great you found the cause! Please mark my answer and/or Monika's answer as "solution" so this is problem is marked as solved, thanks!

UserImage.jpg
Monika Wöhrl
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? 

UserImage.jpg
Kurt Allen

Hi Monika: Thanks. You were right! I found the old bugger. I accidentally assign the wrong value to the maxRecords, startIndex is set (0) zero. 

paginationerrorsolveedit.png
UserImage.jpg
Kurt Allen
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. 

UserImage.jpg
Kurt Allen
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. 

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP
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?


UserImage.jpg
Kurt Allen

Hi Kilian: Well,  the exercise required a manual build for the pagination which I followed step by step. However, you might be on to something as I did set some values to 0 (zero). I will retrace my step. Please give me a few minutes to share my findings. 


UserImage.jpg
Kurt Allen

Hi Kilian: Thanks. You were right! I found the old bugger. I accidentally assign the wrong value to the maxRecords, startIndex is set (0) zero.

paginationerrorsolveedit.png
2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Great you found the cause! Please mark my answer and/or Monika's answer as "solution" so this is problem is marked as solved, thanks!

UserImage.jpg
Monika Wöhrl
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? 

UserImage.jpg
Kurt Allen

Hi Monika: Thanks. You were right! I found the old bugger. I accidentally assign the wrong value to the maxRecords, startIndex is set (0) zero. 

paginationerrorsolveedit.png
UserImage.jpg
Kurt Allen
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. 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.