mauddib6 Posted July 28, 2006 Posted July 28, 2006 I am trying to use the find/replace feature to eliminate user entry errors when they hit the "enter" button twice while typing in a list. I can't seem to find a way to make it find the carriage returns. - Would I have to do all of this in a calc field.
Lee Smith Posted July 28, 2006 Posted July 28, 2006 Capture two returns from a text file or field. Lee
mauddib6 Posted July 28, 2006 Author Posted July 28, 2006 Thank you for the quick response. I tried what you said, but it only seems to partially work. It will find the double carriage return. But, it will not replace it with a single or for that matter any other number of carriage returns. It also won't find two carriage returns if it is at the end of the field (which is the most likely place a user will put it.)
bcooney Posted July 28, 2006 Posted July 28, 2006 How about a custom function? There's Ray Cologon's Trim4 function. You can find it on Brian Dunning's site. http://www.briandunning.com/cf/166
mauddib6 Posted July 28, 2006 Author Posted July 28, 2006 I just have Pro and not Advanced, so I can't use the Custom function feature. I am still working on the leading and trailing carriage returns, but this eliminates all of the "middle" carriage returns. Loop If [“PatternCount(field, “¶¶”)>0 Set Field [“field”, “Replace(field, Position(FirstName, “¶¶”,1,1),2,” ¶”] End If Exit Loof If[“PatternCount(field, “¶¶”)=0”] End Loop
mauddib6 Posted July 28, 2006 Author Posted July 28, 2006 Placed after the loop in the previous post, this will take out leading and trailing carriage returns. If [Left(field,1)=” ¶”] Set Field[“field”, “Right( field, Length(field)-1 )” End If If [Right(field,1)=” ¶”] Set Field[“field”, “Left(field, Position( field, "¶" ,1, PatternCount(field, "¶" ))-1)”] End If
Fenton Posted July 28, 2006 Posted July 28, 2006 Here's an old formula, for converting multiple paragraph returns to one. I believe it will do up to 21 consecutive. To do more, add a line with 21 (at top). I think it was Bob Weaver who not only came up with this, but who explained why it works. We no longer need it with 7/8, as we can use a Custom Function. Substitute(Substitute( Substitute(Substitute(InputText, ”¶¶¶¶¶¶”,”¶”), ”¶¶¶”,”¶”), ”¶¶”,”¶”), ”¶¶”,”¶”)
gnfb Posted July 30, 2006 Posted July 30, 2006 I was actually going to post a question re spaces but the answer may be here I cut and paste from emails into fields sometimes the input string has spaces at the begining or end that i dont want recorded is this the same thing that you are talking about here?
Lee Smith Posted July 30, 2006 Posted July 30, 2006 Use the Trim Function to remove the leading and trailing spaces. Also, check this post if you need to remove more spaces within the text by Bob Weaver Link HTH Lee
gnfb Posted August 5, 2006 Posted August 5, 2006 Ok Ithink im getting there have got it removeing spaces but not returns Left(test2, 8) If [Left(test2,1)=" ¶"] Set Field["test2", "Right( test2, Length(test2)-1 )" End If If [Right(test2,1)=" ¶"] Set Field["test2", "Left(test2, Position( test2, "¶" ,1, PatternCount(field, "¶" ))-1)"] End If Can you spot the mistake?
beastman Posted August 7, 2006 Posted August 7, 2006 Similar to this how do you remove or replace Caridge returns in excel. see example below.. dfgdfgdfgdfgdfgdfgdfgdf I can use the =(SUBSTITUTE((Insert Cell here),CHAR(?),CHAR(10))) but I do not know what ascii character filemaker exports it charidge return as? Please advise
Recommended Posts
This topic is 6684 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