Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
android1686764069
Contributor
Contributor

tsalesfoceinput : ignore carriage return (or line break) in a column to display in a csv file

Hello

I'm extracting data from salesforces with tSalesforceinput component.

Data are then stored in a csv file, columns are sepaarated by a semicolon.

One of the column read with

tSalesforceinput is related to an adress. As such, this adress contains strings type values.

My issus is that the adress given in salefirce may be long and carriage returns are inserted.

When this long adress is stored in a my csv file, the carriage return in the adress field disturbs the csv file : what comes after the carriage return is not stored in the adress field. It is considered a new line in my csv field and so everything is offset.

how can can i ignore the carrriage so that the whole adress given in Salesforce is store in the "adresse" field in my csv file?

see my example below : line 4 should be in line 3

0695b00000kXCFcAAO.png

Labels (3)
1 Solution

Accepted Solutions
anselmopeixoto
Partner - Creator III
Partner - Creator III

Hi @android devops​ 

 

I suggest you use a tJavaRow or a tMap component to intermediate the input and output components.

 

Then, on the address columns or every other columns you want to remove specific characters, you could use the String replaceAll() method like in the following example:

 

row1.address.replaceAll("[\r\n@]*", "") // replaces every occurrence of "\r" "\n" or "@" with an empty string

View solution in original post

1 Reply
anselmopeixoto
Partner - Creator III
Partner - Creator III

Hi @android devops​ 

 

I suggest you use a tJavaRow or a tMap component to intermediate the input and output components.

 

Then, on the address columns or every other columns you want to remove specific characters, you could use the String replaceAll() method like in the following example:

 

row1.address.replaceAll("[\r\n@]*", "") // replaces every occurrence of "\r" "\n" or "@" with an empty string