Sidebar

My channel is throwing error where one of the field has double quotes as value

0 votes
215 views
asked Oct 18, 2021 by pradeepkumar-j-1408 (160 points)
edited Oct 18, 2021 by pradeepkumar-j-1408
I have comma separated message where the field values are enclosed with double quotes. My channel is throwing error where one of the field has double quotes as value. Please see the example field value

""SANGRADO Y DOLOR DESPUES DE UN LEGRADO" POCS"

I am getting error while setting the message

message.setNode("/", source.getNode("/"));

 

How i can clean the field if the field has mismatched double colon

1 Answer

0 votes
You can escape the double quotes with double quotes.

message.setNode("/", qie.escapeCsv(source.getNode("/")));

I think what you really want is to get the value:

"SANGRADO Y DOLOR DESPUES DE UN LEGRADO" POCS

and change it into:

"""SANGRADO Y DOLOR DESPUES DE UN LEGRADO"" POCS"
answered Oct 18, 2021 by michael-h-5027 (14,350 points)
...