Hello. I’m trying to create a mobile number generator that generates numbers for any country chosen. The generated number is working, however, the number of times to generate a given number does not work while using a While activity to loop. The generated number is the same every time. Please download the demo to investigate more. Thx.
You’re not resetting “i”, so it generates a number on the first loop, then for each subsequent loop, the bot sees that “i” already <= 5 and doesn’t proceed to enter that do while.
Resetting “i” to 0 before the embedded do while should get you past this.
You’ll also need to do the same and reset strBuilder at the same point otherwise it results in 5 numbers being appended each loop.
That works pretty well even though its using a different formula and even with no variables needed except for the strBuilder. I think I’ll use your solution method. Great job @ahmad.sultan! I’ll have to learn more about using formulas.