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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
A_San
Contributor
Contributor

Extract substring from filename

I am trying get the frequency from the file name PMS.TDWCPMC.D190402.T1821273 - W (for Weekly).

I am getting the file name using ((String)globalMap.get("tFileList_1_CURRENT_FILE")).

So If I want to extract the frequency from the file name, I try this :

StringUtils.substring(((String)globalMap.get("tFileList_1_CURRENT_FILE")),6,7)

but I am getting this error "Exception in thread "main" java.lang.Error: Unresolved compilation problem: "

 

Any help would be appreciated.

Labels (2)
1 Solution

Accepted Solutions
TRF
Champion II
Champion II

Try this one
((String)globalMap.get("tFileList_1_CURRENT_FILE")).substring(6, 7)

View solution in original post

1 Reply
TRF
Champion II
Champion II

Try this one
((String)globalMap.get("tFileList_1_CURRENT_FILE")).substring(6, 7)