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: 
pthomas
Contributor III
Contributor III

How can I pass in a variable with a comma into a tRest component

I am looping through data and calling a tRest component, passing in values as I go.  I ran across a value with a comma in it.  The url with html-ification applied "%2c%20" works but Talend strips the data from the comma and past.  

The value is not this but similar "Hardcover Books."  I've tried "Books, Hardcover" - the value in the loop and "Books%2C%20Hardcover" - the html-ification.

The tRest runs but returns no data for "Books."  So Talend is not playing well with the comma.

Any ideas?

 

 

Labels (6)
3 Replies
Shicong_Hong
Employee
Employee

Hi 

If the value contains a comma before being passed to the tRest component, try replacing it with "%2c". You can perform this transformation on tJavaRow, tJava, or tMap.

Regards

Shicong

pthomas
Contributor III
Contributor III
Author

 

I tried to add the "%2c" and "%20" for the comma and trailing space but the url only contains value up to the "%2c".

Xiaodi_Shi
Employee
Employee

Hello @pthomas ,
Would you mind posting your tRest component setting screenshot with url into this thread? So that we could know what the issue look like and try to address it. Please mask your sensitive data as well.
In addition to that, as tRest component has been deprecated since in R2025-04 ( not really removed but hidden from the palette), is it working for your with tRestClient component instead?
Best regards

Sabrina