If I understand correctly you try to save letters in a number field.
FileMaker allows you to do this but it is not recommended and leads to the problems you describe. Use a text field instead.
I just checked my solution to make sure and it already is a text field with the auto enter option selected and the text i have in there is CN001.
Does this make sense?
I created a test db to check your setup. One field (text) with option serial, next value CN001.
I created 3 records, serial counted correctly. Then I changed the value of next serial via script step to CN010 and after this it was again counting correctly.
So I can't see your problem.
Thank you for your time on this i really appreciate it.
Here is the exact script i have written.
Import Records (this is the old clients file which has all my clients i want to import to the new clients file)
Go To Record/Request Last
Set NExt Serial Value (Client_number ; Client_number+1)
If the last records client numbe ris CN0021 it sets the next serial when i check define fields to 22, just a number no CN00
ClientNumber + 1 is a number operation. So FileMaker is smart and extracts the number for you. You have to add "CN" and the leading zeroes afterwards again.
Set Next Serial Value (Client_number ; "CN" & right( "00" & Client_number+1 ; 3 ))
Thankyou this has definatley pointed me in the right direction now.
My only problem now is that the client number will not always have 00 after the CN for example i may have a large database of cleints and the number could be CN9999. If i want to plus one onto this number and keep the CN at the start how would i write this calc?
Am i best to start my Client number serial number as CN1?
I was sort of taught that a serial is better to have a text CN then a few zeros to start it of then a number E.g. CN0001
Remove the CN and the leading zeroes.
Thank you for your help.