I will give you the output for two cases:
Case one:
With this formatting (3 elements):
__default__ = {
separator = ,
sort_order = [coll_num, item_num, sub_number],
elements = {
coll_num = {
type = LIST,
values = [_RU, SKU, KUN, UMC, T2O],
default = UMC,
width = 3,
description = Collectie code,
editable = 1,
table = ca_objects,
field = idno,
sort_field = idno_sort,
},
item_num = {
type = SERIAL,
allowsuffix = 1,
width = 16,
zeropad_to_length = 5,
description = Item number,
editable = 1,
table = ca_objects,
field = idno,
sort_field = idno_sort,
},
sub_number = {
type = FREE,
width = 30,
default = "",
editable = 1,
description = _(Sub number)
table = ca_objects,
field = idno,
sort_field = idno_sort,
},
},
},
I get this output
idno idno_sort idno_sort_num
UMC 00061 Sub004 UMC 00061 Sub004 ... 311429700
UMC 00061 Sub003 UMC 00061 Sub003 ... 311429600
UMC 00061 Sub002 UMC 00061 Sub002 ... 311429500
UMC 00061 Sub001 UMC 00061 Sub001 ... 311429400
_RU 02357 SUB01 _RU 02357 SUB01 ... 31375800
_RU 02357 SUB01 SUB01 _RU 02357 SUB01 ... 31375800
_RU 00022 Sub01 _RU 00022 Sub01 ... 31142300
_RU 00051 W01 K02 _RU 00051 W01 ... 355200
_RU 00051 W01 K02 R01 _RU 00051 W01 ... 355200
_RU 00051 W01 _RU 00051 W01 ... 355200
In the UI I get right suggestion of next serial only for the default value in coll_num and it does not update on switching coll_num and saves the wrong serial. It keeps saving the formally highest serial for the default coll_num it had found first time the configuration for multipart_id_numbering.conf was changed
Case two:
With this formatting (2 elements):
__default__ = {
separator = ,
sort_order = [coll_num, item_num],
elements = {
coll_num = {
type = LIST,
values = [_RU, SKU, KUN, UMC, T2O],
default = UMC,
width = 3,
description = Collectie code,
editable = 1,
table = ca_objects,
field = idno,
sort_field = idno_sort,
},
item_num = {
type = SERIAL,
allowsuffix = 1,
width = 16,
zeropad_to_length = 5,
description = Item number,
editable = 1,
table = ca_objects,
field = idno,
sort_field = idno_sort,
},
},
},
I get this output
idno idno_sort idno_sort_num
UMC 00070 UMC 00070 330200
UMC 00069 UMC 00069 330100
UMC 00068 UMC 00068 330000
UMC 00067 UMC 00067 329900
UMC 00066 UMC 00066 329800
UMC 00065 UMC 00065 329700
UMC 00064 UMC 00064 329600
UMC 00063 UMC 00063 329500
UMC 00062 UMC 00062 329400
UMC 00061 UMC 00061 329300
In the UI I get correct suggestion of next serial that updates on switching coll_num and saves the correct serial.
Disadvantage: sorting of idno's with Alphanumeric suffix follows after highest idno without alphanumeric suffix