BeckhamTX Posted July 29, 2004 Posted July 29, 2004 I am amking a database for a user to replace an older non filemaker database. One table has about 60 fields, and when i import data from the old DB, it comes in with extra spaces at the end of each field (for example: the first name field in the old db contains 15 characters, so John would import as JohnXXXXXXXXXXXXX - where X are spaces). This is not good, especially in cases where letters and other layouts are created using merge fields. I know I can set up a second field and use the trim function to remove the spaces, but with 60 + fields, I was wondering if there was some way you can trim while importing so i dont end up having to create a secoind, trimmed field for each existing field.
Lee Smith Posted July 29, 2004 Posted July 29, 2004 Take a look at this posts, it covers what you need to do. If you need further clarification, then let us know. http://www.fmforums.com/threads/showflat.php?Cat=&Number=90614 HTH lee
ESpringer Posted July 29, 2004 Posted July 29, 2004 BeckhamTX, Lee's recommendation for previous thread was a good one. However, if you have FM7 (hard to tell since you haven't yet specified a profile), you can: Use the Auto-Enter Calc with Replace Existing Contents (De-select "Do Not Replace"), so that no matter what data is input, the field will modify the contents to match the calc. So, define Field1 as text with option: Auto-Enter Calc [Replace]: Trim(Field1), etc. If you define fields this way, the import will give you the option of performing auto-enter functions on import.
BeckhamTX Posted July 29, 2004 Author Posted July 29, 2004 OK, I read those postings, sounds good, but I had also gone in and done some more "playing" in my database trying to see what I could find. What I did for one field was "Replace Field Contents". For example, for the field FName, I went to replace field contents and specified trim(FName). It seems to have worked fine for the field I tried it on. I am going to try it on the other fields and see how it works on them.
BeckhamTX Posted July 29, 2004 Author Posted July 29, 2004 ESpringer, thankx for the info, I didnt mean to post the same thing over after your post, but by the time I finnished typing my last post, and verifying it actually worked, yours had already posted. Thankx for the help.
Recommended Posts
This topic is 7773 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now