I had a fellow community member check this for me and the WHILE statement did exit successfully, however, they created the SA on a NodeJS server modal whereas I am using ASP.NET.
The only way I can get the WHILE to exit is to set Max Iterations otherwise it performs an endless loop.
Show screenshots of all of your Set Value runwhile, most likely the issue is the lack of usage of global name. I suggest the global name to be different than the standard name, and the while loop should check this global name variable (I’m speaking from experience, I also opened a bug report about this on NodeJS, which was deemed invalid)
Set the Max Iterations on the while to prevent infinite loops. Does the counter update correctly, perhaps it is always getting page 1 since counter is set to 0 and then counter + 1 is 1, when you do not update a global variable as with the runwhile it will always create a new local variable base on the counter from the parent scope.
I have made the following changes.
I set the counter to one at the beginning and only increase it if the count of records is greater than zero.
I have also ensured that I am updating the global variable.
With Max iterations empty, now it triggers the breakout of the WHILE statement when no devices found on the first call, however, If there are any devices found, I still get stuck in the loop.
If I change it to a group with devices, say 545, it gets stuck in the loop. I can get it to breakout of the loop by putting back in Max iterations of say 5.
The update file you provided has fixed the infinite loop once I corrected the counter issue.
To validate the updated files (DMXzone.ServerConnect), I put the original ones back and again it infinite looped. I again put the updated files back on the server, and the WHILE statement correctly breaks out.
Fix will be included in the next Wappler Beta, if you want to stay on the current Stable version of Wappler you can use the file I’ve posted until you upgrade to Wappler 6.
It is possible that we maybe will make the update available as an extension update for the stable Wappler.