I have a table with 1 row…I use this table to store preferences, but also for counters.I use a simple method
var a = forms.menu.dossierprefix+utils.stringRight('000000'+(forms.menu.dossierlaatstenummer+1), 6);
forms.menu.dossierlaatstenummer+=1;
forms.menu.controller.saveData();
To create a number like 2007.000123.
dossierlaatstenummer is an integer. The reasion why I use this construction is becoz I want the user to give the freedom to change the counters and its format(for example at a beginning of a new year)
Occasionaly Servoy gives out double numbers. At first I thought that someone was tampering with the prefences and changing dossierlaatstenummer. So I put auditing on this table.
The results kinda confused me.
The log_data (see attach) shows that the dossierlaatstenummer goes from 1043->1044->1045 and then back to 1043->1044
Shouldn’t there be an entry in the log_data stating 1045->1043 ?
Anyone else had this kinda problem before? If there is better way to make a counter, i am always open for suggestions.
Thankx in advance.
Paulo
