Thanks Alex

Problem resolved - this now works perfectly and generates random MapIDs and it all goes seamlessly in the batch conversion too - an excellent solution.