
u7n8v (u7n8v) asked a question.
There is a workflow running in the system which creates unique email address for new users. I'm calling a helper workflow from the parent where the helper reiterates through the loginname database and creates a username that has not been used. The helper workflow increments by 1 and then rechecks the database for duplicity. It looks like this call and iterative step has a limit of only 249 steps. Currently I have usernames in the system with xyz350, so the workflow is not able to check and create a unique loginname. The error that I receive is Stack limit exceeded.
Is there a way to go beyond 249 steps and not have the workflow error out.

I found this one sort of interesting so I built out some logic to take an input (first.last123@domain.com), do a search to return the first page (200 records) of users that Start With (first.last). I then make a list of numbers from those users then determine the highest numbered value of that list.
This is an example. A complete flow would require you to build out pagination using Call Flow card to return the entire list before parsing it out to find the highest increment.
This however would be performing very few API calls and would be quite quick.
See attached
findinghighestincrement