This is certainly a very nifty little tool. I have a form that our users will use when requesting a name change. Via rules the final name, email address and login name are set based on the information provided. We have many employees who would have duplicate login names if we didn't add numbers afterwords. I would like to be able to take this information and use it to generate a new logon name that is correctly numbered if necessary, but am not quite sure how to do this.
findusersbyalias might return something like this:]
juser
juser1
juser2 and so on, even into double digits, juser10. I need capture the numbers at the end of the login names returned by the finduserbyalias and get the one with the highest number or find a way to have it only return the highest numbered one. Once I can identify this one it's very simple to just add 1 to that to get the next number in the sequence.
Any ideas would be greatly appreciated.