I trie test out what you are trying to achieve with the built-in function. But, it seems that the built-in “auto generate” field is limited to 1 reference field. You can only select either “key field” or “date field” as the reference for creating different running numbers.
Can you provide some more context to the Main table and this subtable?
Maybe there’s other workaround.
However, if this kind of number format is a “strict” requirement.
Probably no easy way to use the existing built-in field to achieve.
You can create multiple fields for recording/generating the separate numbers, and in your target field, you can apply formulas to combine the string to return the serial number in your desired formatting.