July 29, 200421 yr 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.
July 29, 200421 yr 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
July 29, 200421 yr 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.
July 29, 200421 yr Author 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.
July 29, 200421 yr Author 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.
Create an account or sign in to comment