How to remove accidental carriage returns from a text field?

Hi ,I have a notes document which some of text fields were entered by carriage returns, as I use some of these fields as a key to get document collection,so my Getdocumentbykey lookup does not work due the carriage returns.

I have to remove the carriage returns on the sorted first column of lookup view. I tried to use this:

@replacesubstring(text1field; @char(13) : @char(10) ;“”) But it seems these codes does not work, the carriage return does not convert to space,

any ideas?

Subject: Explode then Implode

tList:=@Explode(@ThisValue;“”;0;1);@Implode(tList)

Subject: RE: Explode then Implode

Hi Lawrence,Your codes works perfect, actually @Explode is enough for solve the problem, probably we do not need @Import.

But one thing I want to know that the design help tell us to use @ReplaceSubstring for the Carriage return, but why it is not working?

For text fields for user to enter data, it is easy to create a carriage return, if we use this kinds of fields as a key to lookup, probably we need to validate them before save it.

Anyways, thanks a lot for your help,

Subject: How to remove accidental carriage returns from a text field?

Or try this in your Input Translation:

@ReplaceSubstring(FieldName;@NewLine;" ");

@Trim(@UpperCase(FieldName))

I you don’t require Uppercase, just use the @Trim

Subject: RE: How to remove accidental carriage returns from a text field?

Hi Ron,I tried your codes, but it is not working.

Anyways, thanks a lot for your help,

I will use the first codes,