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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Ven6
Contributor III
Contributor III

Verify size and name ans save de value in a context variable

Hello I have a problem.

 

I have a job that lists the .csv files in a directory, then using tFileproperties I output the information from each file and display it in a tLogRow. I create a context variable (context.last) and I assign it the name of the last file in the directory in a tJava.

0683p000009M9Yd.png

 

I would like this when :I iterate in the directory;
if the size of a file = 0 then it stops the iteration and assigns the name of this file to the context variable (contest.last)
Otherwise context.last = the name of the last file.

please help here join the job

Labels (2)
1 Reply
Anonymous
Not applicable

try this on tJavaRow:
context.last=input_row.baseName;
if(input_row.size==0){
break;
}