This is the best way to do it strictly within Glide.
@Darren_Murphy could probably confirm, but I believe there would still be an issue with duplicate numbers if multiple users generated an order number at the same time. In that case, you would probably have to use an external service to sequentially process and increment the numbers.