AnsweredAssumed Answered

Trim Returns

Question asked by braxton on Mar 28, 2011
Latest reply on Mar 28, 2011 by braxton

Title

Trim Returns

Post

I am using FM 9.  If I have a group of fields for name, address, etc.:

FirstName     LastName

BusinessName

Address1

Address2

City   State  Zip

Country

and I want to summarize them in one field where if field data doesn't exist it would automatically delete that line.  How would I do that the easiest and simplest way.

In the past I have nested "If then" statements.  But, that gets messy after a few options.

I also just tried the custom function:

fnTrimReturn (text)

// removes single line breaks but preserves double line breaks
// input: text
// output: text with ¶ line breaks removed

Substitute ( text ; ["¶¶"; "*#*#*#*#"];["¶";""];["*#*#*#*#";"¶¶"] )

But, that just puts everything in one line.

Any help would be appreciated.  Thanks.

Outcomes