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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Filtering integer value from input stream in tJava

The result of CurrentKey value of tS3_List is as follows:
FolderName1/FolderName2/1970/01/01/file_name.csv.gz

 

I need path like:
FolderName1/FolderName2/1970/01/01/

 

How do I filter the integer value from "(String)globalMap.get("tS3List_1_CURRENT_KEY")" to get the path I mentioned above?

Labels (2)
1 Solution

Accepted Solutions
TRF
Champion II
Champion II

This one better as it doesn't depend of the number of parts: ((String)globalMap.get("tS3List_1_CURRENT_KEY")).substring(((String)globalMap.get("tS3List_1_CURRENT_KEY")).lastIndexOf('/')

Can't check the result from my phone but should work

View solution in original post

3 Replies
Martintin
Contributor III
Contributor III

Hi,

 

If i understand well, all you want to do is cutting the last part of the String (file_name.csv.gz) ?

If yes, you can do like that :

 

0683p000009M81T.png

I think it's not the better way to achieve it but it's working.

 

 

Warm Regards

TRF
Champion II
Champion II

This one better as it doesn't depend of the number of parts: ((String)globalMap.get("tS3List_1_CURRENT_KEY")).substring(((String)globalMap.get("tS3List_1_CURRENT_KEY")).lastIndexOf('/')

Can't check the result from my phone but should work

Anonymous
Not applicable
Author

Thanks for the quick reply! 

It worked.

 

Regards,

Bhagwat