Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6684 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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.

Posted

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.)

Posted

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

Posted

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

Posted

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

Posted

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,

”¶¶¶¶¶¶”,”¶”),

”¶¶¶”,”¶”),

”¶¶”,”¶”),

”¶¶”,”¶”)

Posted

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?

Posted

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

Posted

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?

Posted

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.