cmwirish Posted April 17, 2009 Share Posted April 17, 2009 Hi there, I know this can be done ina an excel file but my boss wants to know if there is a way to delete leading zeroes from a data base; such as 000001. I just did an insert data (is that what it is called? sorry I am a graphics person - very right brain sided and lots of this is confusing) in my text box - everything worked wonderful except that we don't want the leading zeroes. Any help would be greatly appreciated. Sincerely, chrissy Link to comment Share on other sites More sharing options...
Jordanh Posted April 21, 2009 Share Posted April 21, 2009 try this: Var1 = parseInt(Field("YourField"), 10) Return Var1 that should delete the zeros. let me know if this fixes your problem Link to comment Share on other sites More sharing options...
rpaterick Posted April 22, 2009 Share Posted April 22, 2009 Is this just a sequence number campaign? Since learning about how FP can do "custom" sequence numbers right in FP without a database file, I will never have to create an excel file and drag until I get the correct count. Thanks to Dan for showing me how to do this. Link to comment Share on other sites More sharing options...
cmwirish Posted April 22, 2009 Author Share Posted April 22, 2009 Dear rpatrick, Thank you for your help. I worked around the issue with excel for the file, but had a few moments down time so made a new file with zeroes and made a new rule "Deleting zeros", but kept getting a syntax error when trying to save the rule. I am really lost when it comes to all this - (but am a quick reader!) so will try to figure it out from the manual. mmm not a sequence number campaign I don't think - not sure what that is... Thank you again! c Link to comment Share on other sites More sharing options...
Dan Korn Posted April 22, 2009 Share Posted April 22, 2009 If you copied Jordanh's code verbatim, you might get a syntax error because the keyword "return" is not correctly capitalized. Try this: return Int(Field("YourField")); Link to comment Share on other sites More sharing options...
rpaterick Posted April 22, 2009 Share Posted April 22, 2009 mmm not a sequence number campaign I don't think - not sure what that is... c Are you creating a database file that is 1-XXXXX??? FP will eliminate the need for creating a data file just for a sequence number. Basically you are starting at 1 and ending at "whatever number you would like." Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.