How to program multiple Auto Increment fields

In a DocType that I am creating I have a need to create two fields which are auto increment.

By Auto Increment I mean when a user creates a new entry these two fields should get auto incremented.

Here I have to give the users facility to enter a value in these fields and if user has entered any value I need to first check that it is unique and then save the data.

How can I achieve both of these?

Hi @YogiYang,

I don’t know if is it helpful or not but If you haven’t checked then please check the documentation.

Thank You!

Thanks for the link. I have already checked the docs.

My need is a bit different.

Let me give you some background of the app that I am developing.

I have three doc types:

  • Standard Master
  • Division Master
  • Student Master

One field in Student Master is called GR No which is unique through the whole table and needs to be auto incremented. In this case user can enter GR No if required and the system has to check that it is unique.

Second field is called Roll No which is read only and which is suppose to be unique in selected Standard and Division combination and has to be auto incremented also.

I hope I am making some sense in explaining my requirements.

Can someone suggest how to handle this?