April 28, 200520 yr Quick overview of our current setup: Running FileMaker 5.5 Server on Mac OS X Server 10.3.8 on a Dual 1 GHz xServe G4 w/ 1 GB RAM. Hosting about 30 - 35 databases. Staff uses FileMaker Pro 6.0v4, I use FileMaker Developer 6.0v4. Want to achieve the following: In a particular database, there is a field called Location_No, type is Number. Some of the numbers are 00001 or 00075 or 00235 or 03040, etc. Is there a way I can script the following on just this field: If characters 1-4 of field Location_No are 0, replace with nothing. So, basically, 00001 becomes 1, 00235 becomes 235, 03040 becomes 3040 and so on. Naturally, others I want left alone. Only the ones that have 0's to the left (so to speak). I did some research, found Left(text, number) and I'm aware of Find/Replace...however I could use some assistance scripting this. Thanx in advance.
April 28, 200520 yr IIUC, you want to remove the leading zeros. If so, you can use TextToNum ( Location_No ).
April 29, 200520 yr Why go through a script? changing the Location_No field to a calculated field (Location_No = Location_No) with calculated result is number does the trick. You can turn the Location_No field back to a Number type after the calculation modifies all the records.
Create an account or sign in to comment