Newbies Tom Brown Posted June 30, 2006 Newbies Posted June 30, 2006 I imported an ascii file into Filemaker 7. One field is a long text field that has carriage returns. After the import into Filemaker the carriage returns were replaced with the text /n/n. I want to bring the carriage returns back. I tried the find/replace function but I can't seem to put a carriage return symbol into the replace box in the dialog window. Can this be done? Thanks, Tom
Orlando Posted June 30, 2006 Posted June 30, 2006 (edited) Hi there Tom You would use the substitute function to achieve this. Substitute ( TextField ; "n/n/"; "¶") The ¶ symbol is a carriage return in FileMaker. You could use this in a set field script step or Auto Enter Calculation in the text field. I hope this helps. Straggler Edited June 30, 2006 by Guest
Raybaudi Posted June 30, 2006 Posted June 30, 2006 "I tried the find/replace function " Don't use that but, after selecting that field, go to: Records-->Replace field contents...-->Replace with calculated result-->specify: (here your calc) BTW: be sure to make this on a copy of your DB.
John Mark Osborne Posted June 30, 2006 Posted June 30, 2006 Just to clarify a small point since Tom is a beginner. You showed him the following formula: Substitute(TextField; "n/n/"; "¶") He said his text contained "/n/n". So, the formula should be: Substitute(TextField; "/n/n"; "¶") In addition, if you use this formula in a script as you suggested, a table name is required: Substitute(MYTABLE::TextField; "/n/n"; "¶") I also agree with Daniele to use Replace Field Contents since it will work on all his records in the found set. It's better not to throw out a scripted solution to a beginner that only works on one record at a time. Also, the auto-enter calculation won't work on his existing data. Just some thoughts on who your audience is and to make sure you are clear.
Newbies Tom Brown Posted June 30, 2006 Author Newbies Posted June 30, 2006 Thanks to everyone for responding to my question. Daniele's suggestion worked like a charm. It is much appreciated. Tom Brown
Orlando Posted July 1, 2006 Posted July 1, 2006 Thanks John for your points, I am relatively new to posting on the forum and just did not consider things like that. The Straggler
Newbies Tom Brown Posted July 3, 2006 Author Newbies Posted July 3, 2006 In my initial euphoria over Daniele's solution I didn't notice something. After I run the substitute and replace the characters with paragraph returns I lose the last four characters of the field contents. So if an entry ends with "more." the field just ends with "m". So I lose the "ore." at the end of the field. This happens if the field entry goes over a certain length; shorter lengths don't seem to have the problem. Btw the subsitution is for "nn" not the "/n/n" I orignally posted. These are being replaced by two carriage returns. Sorry about that. Tom Thanks.
Raybaudi Posted July 3, 2006 Posted July 3, 2006 BTW: be sure to make this on a copy of your DB. It is for this type of errors that I said that ! BTW: what is your calc ?
Newbies Tom Brown Posted July 3, 2006 Author Newbies Posted July 3, 2006 Daniele: My calculation was Substitute(tablename::field name;"nn";"¶¶") I ran this on a copy of my database, as you suggested my master data is ok. Thanks for thinking about this and good luck in tomorrow's game. Tom
Newbies Tom Brown Posted July 3, 2006 Author Newbies Posted July 3, 2006 I just realized my error. I was using the calculation that would have appeared in a script. I just tried this calculation and it worked 100%: Substitute(fieldname;"nn";"¶¶"). Sorry to bother anyone with my carelessness. Tom
Recommended Posts
This topic is 6718 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