Increment number on server

I know how to get to work around the parts of the (PT-(gender)-(year)-(some incremental number 1, 2, 3, 4, .... 10,000) except the sequencial part. Can someone guide me on how to go about it.

1. What is the issue? Please be detailed.

2. What steps can we take to reproduce this issue?

3. What have you tried to fix the issue?

4. Upload any forms or screenshots you can share publicly below.

You can use the ODK Counter app for this (https://github.com/getodk/counter), also available on Google Playstore. ODK Counter will increment the number for every new instance. You can let it auto generate the number next in the sequence or increment manually.

Thanks Shashpal, unfortunately I would like this to happen on the server side (odk cloud) after the form has been submitted