NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: oggy on August 24, 2011, 01:51:04 AM
-
I have string datafield which is formatted in @n06 picture.
In offline application, formating this field goes without problem (format(dat:numb,@n06)), but from web application, how to format to get exactly the same?
When I close/complete form in which that field is, I got wrong formatted field in database. In session value also all look well, but on completion and after inserting in database, no.
For example: the right format must be 000056, but I have in database entry of 56...
Regards, Ozren
-
Ozren,
I haven't done this, but I'm sure it will work.
Make the field a string field, not a number field. then format the number in the way as you have it with FORMAT - then the value should display with the zeros padded in front. The only thing then is that the default number validation won't work because it is now regarded as a string. You could then do the validation yourself.
Thys
-
what is the data type of dat:numb ?
cheers
Bruce
-
Dat:numb is string, formatted in @n06 picture....
Dont ask why :)
And I cannot change it in dictionary...
I forgot to say that dat:numb is last part of 5-component primary, unique, autoincrement key
-
In that case, format the field directly in the ValidateValue::Fieldname routine
ie
dat:numb = (format(dat:numb,@n06)
I hope for your client's sake the number doesn't go past 100000 records.
Cheers
Bruce
-
Never, ever in past four years, any of our customers did not pass this magically boundary of 100000 records, not even close.. This will mean 100000 invoices per year, ;)
Regards, Ozren.