Hello,
I am finding it hard to explain my typical requirements.
But let me try and explain.
In Brief
In a custom app that I am creating. I have created a DocType in which I want to have different numbering series based on a field names work_station
and current date. So depending on work_station
and date the number will increment.
In Detail
I want to maintain one single DocType. In this DocType I want to maintain auto numbering series which will depend on the field work_station
and current date.
We have got 20 different Work Stations.
The format of the series is: PRB-{work_station}-DDMMYYYY-####.
Example: PRB-RH01-26082022-0001.
Here if the Work Station and/or date changes the series numbering should start from 1.
For example if a new entry is created for a Work Station then its number would be PRB-RH01-26082022-0002, PRB-RH01-26082022-0003, PRB-TB01-26082022-0001, PRB-TB02-26082022-0001, etc.
And if date changes then the number would be PRB-RH01-27082022-0001, PRB-RH01-27082022-0002, PRB-RH01-27082022-0003, PRB-TB01-27082022-0001, etc.
After experimenting I have understood that it will not to possible to have such varied numbering series. So the best way that I can see is to build some logic to create such series.
Can someone guide in coding such series?
TIA
Yogi Yang