Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
sonalijagtap
Contributor III
Contributor III

Replace \n in Object type field

Hi Team,

 

I have one scenario where column has data type Object. But in that field, I am getting \n and I want to replace it with " ".

But when I am using tReplace component as well as replaceAll() method, I am getting error as those function work on String Data type.

Is there any other way to replace \n with space other than converting the data type from Object to String and then use replace function?

 

Please provide me your comments. Early responce appreciated.

Labels (1)
  • v7.x

1 Solution

Accepted Solutions
Jesperrekuh
Specialist
Specialist

Yes but probably involves more java code...
Objects are stored in bytes, so you need to replace the byte which corresponds to \n with the bytes you want it to replaced by...
Just go for the object -> string -> replace -> object

View solution in original post

1 Reply
Jesperrekuh
Specialist
Specialist

Yes but probably involves more java code...
Objects are stored in bytes, so you need to replace the byte which corresponds to \n with the bytes you want it to replaced by...
Just go for the object -> string -> replace -> object