IDC DFD Calculation: Removing Line Breaks

Does anyone know how to remove link breaks in an IDC DFD field calculation? Or perhaps some other way in the IDC DFD such as Format Express for the field?

For example, IDC captures Vessel Name with the line break, but we need the line break removed systematically. Note: Vessel Name is set to MultiLine.

image

I’m thinking you could do a REPLACE() command in the formula field after you make the field “calculable”. Something like this to strip our CR/LF characters:

REPLACE(REPLACE(AccountType,CHAR(10),' '),CHAR(13),' ')

1 Like

Good advice, @MikeGross. But bad results!
Adding the Replace for CHAR(10) and CHAR(13) returns a blank in the field!
Same blank result if I just have a Replace for CHAR(10) only or a Replace for CHAR(13) only.

ok - so according to the docs, it is actually STRREPLACE() so it would be something like this, but using double quotes instead of singles:

STRREPLACE( STRREPLACE(VesselName,CHAR(10)," "),CHAR(13)," ")

I’ve not been able to find how to designate the special ASCII characters, so I’m assuming this would work, however I did find that it is supposed to be about equal to Excel formula syntax - so this syntax above should work if you assume STRREPLACE() is equal to SUBSTITUTE() in Excel.

@JerseyEric I thought maybe it was an array so I was playing with get array, which did not work,
but I captured a multiline address to a single line comment and it is just one line concatenated entry. I did another grouping and it lined them up also.

So, it may be as simple as setting vessel name to single line.

2 Likes

@gpayne – You were correct! It was as simple as removing the MultiLine flag from the Vessel Name field.

You solved the Supply Chain Crisis! These documents are service-type POs for trucks to pick up containers at the ports.

1 Like

LOL You made me choke I was laughing so hard. :smile: