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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

substring function

Hi Guys,
I have a question regarding substring function. I am trying to extract first 3 characters from column.
Following is the function i am using. StringHandling.substr(DSLink3.col1,1,3). I am getting error.
Thanks for help

Labels (2)
2 Replies
Anonymous
Not applicable
Author

Hi skatpally,
You can do the following:
DSLink3.col1.substring(0,3).
In Java, the index of the first character is 0, not 1.
Anonymous
Not applicable
Author

how can i select a string that comes out of the component: tRESTClient for example?
i tried things like tRESTClient.row1.substring(0,5) in tJava component but that doesn't work..the error i get = tRESTClient cannot be resolved
the problem is that the string contains five characters at the beginning of the string that don't belong there.. so i want to remove the five first characters in that string (JSON) so it will be valid in combination with the next component (tExtractJSONFields)