June 30, 200619 yr Newbies 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
June 30, 200619 yr 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, 200619 yr by Guest
June 30, 200619 yr "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.
June 30, 200619 yr 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.
June 30, 200619 yr Author Newbies Thanks to everyone for responding to my question. Daniele's suggestion worked like a charm. It is much appreciated. Tom Brown
July 1, 200619 yr Thanks John for your points, I am relatively new to posting on the forum and just did not consider things like that. The Straggler
July 3, 200619 yr Author Newbies 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.
July 3, 200619 yr 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 ?
July 3, 200619 yr Author Newbies 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
July 3, 200619 yr Author Newbies 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
Create an account or sign in to comment