Jump to content

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

Recommended Posts

Posted

I have three fields in a table, letterText, letterTitle and cLetterTitle. letterText is the body of a written letter. letterTitle is a single line description of the letter. cLetterTitle is a calculation that is equal to letterTitle unless letterTitle is blank. If letterTitle is blank, cLetterTitle is the first 50 characters of letterText. The problem is with carriage returns which I want to filter out. If the first line is "Hi", then nothing else is displayed in cLetterTitle because they have been 'carriage returned' to the next line which is out of view.

Here is the solution I would like:

If ( IsEmpty ( Letter Name ) ; Substitute ( Left ( Letter Text; 50 ) ; [ "r" ; " " ] ) ; Letter Name )

The only problem is putting a carriage return into the Substitute() function ("r" above). I can't get anything to work. I have tried cutting and pasting various characters, including the backwards P paragraph mark. Nothing works.

If ( IsEmpty ( Letter Name ) ; Filter ( Left ( Letter Text; 50 ) ; "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890 ,.'-!?") ; Letter Name )

The above calculation is more successful, but still has problems. Carriage returns are filtered, but that makes the two lines run together with no space between. Also, I can't get quotation marks into the filter. Escaping them with a backslash doesn't work.

Any suggestions?

Posted

On a mac it is Option-G I think... I'm on a PC now so I cannot check.

It's Option-something, just test them all till you find the right one.

This topic is 7465 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.