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'. "
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?
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.
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.
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!
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?
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.
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.