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

Announcements
Discover the Trends Shaping AI in 2026: Register Here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Limit iteration on tfilelist

Hello,

 

I have a tfile list component that get files from an ftp directory which contains hundreds files. But i want only one file (the most recent), it is possible to limit the number of iteration of my tfilelist  to only one, instead of hundreds?

 

Thank you for your support

 

 

Labels (2)
2 Replies
Anonymous
Not applicable
Author

If you select "Order by - Modified date descending" in your tFileList component, then you can then use a tSampleRow to get the first record returned which will be the most recent file.

Anonymous
Not applicable
Author

Hi,

 

The previous answer is wrong,

 

I had a similar problem and found a trick,

tFilelist ---- Iterate ---- tJava (nothing or logs) ---- Run if (((Integer)globalMap.get("tFileList_1_NB_FILE")) == 1) ----- tFileCopy

For other files, the tFileCopy is ignored.

 

If this helps somebody..

 

Pierre