I have an attribute table containing information about area, region, and samples. The table structure resembles the example shown below:
My goal is to automate the generation of IDs when adding new point features to my layer (similar to this). I plan to achieve this using the 'Default value' feature in the attributes form of the layer properties.
The desired pattern for generating IDs is as follows:
- Group the data by the columns 'area', 'region', and 'sample'.
- Identify the maximum number of items within each group and increment this number by 1.
- Pad the resulting number to four positions with leading zeroes.