oCounter = m.goapp.oregistry.lockcounter('%Shared.Counters.Primary Key Bcstypes') if not isnull(oCounter) m.goapp.oregistry.setcounter(m.ocounter, '0') && If key is integer type, you can send through a digit, no problem. m.goapp.oregistry.updatecounter(m.ocounter) m.goapp.oregistry.unlockcounter(m.ocounter) endif