admidio icon indicating copy to clipboard operation
admidio copied to clipboard

Add new profile field type for auto increment

Open Fasse opened this issue 2 years ago • 0 comments

We should add a new profile field type which we can use to autoincrement the values of that field. This could be useful for member numbers.

We should allow to set a prefix and suffix. The user could define a format for the field value e.g. MEM-ID-######-F The placeholder ###### could be used to add a number. Therefore we need another new database field where we store the current value which will be used for the placeholder.

If we want to store a new user we create a new number with the next available value if that field e.g. MEM-ID-34338-F . Before we save the user we must check if this ID is not used.

If there are more than one placeholder and the current number is lower than all placeholders we fill the beginning with zero. e.g. MEM-ID-00032-F

Fasse avatar Feb 13 '22 17:02 Fasse