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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
_AnonymousUser
Specialist III
Specialist III

Using treplace to replace a number in a field

Hi,
I am having issues using treplace to replace a number in a column. The database column is a tinyint, and I want to replace the number 3 with a 4. I can get it to work perfectly on a varchar field, it appears to be the tinyint field that causes the issue. This is the error message that I get:
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
The method replaceAllStrictly(String, String, String, boolean, boolean) in the type StringUtils is not applicable for the arguments (Short, String, String, boolean, boolean)

I see that the arguments do not match, but I am not sure what to change. I have attached an image of the component settings. Thanks for any help.
Labels (3)
3 Replies
Anonymous
Not applicable

Hi
It is a compilation error, the method replaceAllStrictly requires a string type, but the data type of input column is short. You need convert short to string first. Please see my screenshots.
Best regards
Shong
Abakostar
Contributor
Contributor

Hello. Can I see your screenshots. I have the same problem.

Abakostar
Contributor
Contributor

I want to replace the field of number with another by using treplace component. ​Thanks for any help