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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

looping issue

Hi Together,

i try this script to check my Filesize > 10MB and also a check if there exits.

REM SAPFILE-DETECTING###############################################;

Let sapfile_Part_0_Exsists=if(FileSize('Z:\TOR_CONVERTED_PART_0.TXT') >10000000, 0,1);

Let sapfile_Part_1_Exsists=if(FileSize('Z:\TOR_CONVERTED_PART_1.TXT') >10000000, 0,1);

Let sapfile_Part_2_Exsists=if(FileSize('Z:\TOR_CONVERTED_PART_2.TXT') >10000000, 0,1);

Let sapfile_Part_3_Exsists=if(FileSize('Z:\TOR_CONVERTED_PART_3.TXT') >10000000, 0,1);

if $(sapfile_Part_0_Exsists) OR $(sapfile_Part_1_Exsists) OR  $(sapfile_Part_2_Exsists) OR  $(sapfile_Part_3_Exsists) then

Load

MsgBox('SizeCheckError or File Not Found') as Warning1;

Else

Load

MsgBox('SizeCheckOk') as Warning1;

End if;

But during the debugging i get constantly the messagebox.  How can I avoid the (messageloop?) this ?

Thank you very much.

Best Regards,

Labels (1)
1 Solution

Accepted Solutions
MayilVahanan
MVP
MVP

Hi

Try like this

if $(sapfile_Part_0_Exsists) OR $(sapfile_Part_1_Exsists) OR  $(sapfile_Part_2_Exsists) OR  $(sapfile_Part_3_Exsists) then

Load

MsgBox('SizeCheckError or File Not Found') as Warning1 AutoGenerate 1;

Else

Load

MsgBox('SizeCheckOk') as Warning1 AutoGenerate 1;

End if;

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

2 Replies
marcus_malinow
Partner - Specialist III
Partner - Specialist III

Hi Onur,

I'd comment out your ELSE clause and the

Load

MsgBox('SizeCheckOk') as Warning1;


MayilVahanan
MVP
MVP

Hi

Try like this

if $(sapfile_Part_0_Exsists) OR $(sapfile_Part_1_Exsists) OR  $(sapfile_Part_2_Exsists) OR  $(sapfile_Part_3_Exsists) then

Load

MsgBox('SizeCheckError or File Not Found') as Warning1 AutoGenerate 1;

Else

Load

MsgBox('SizeCheckOk') as Warning1 AutoGenerate 1;

End if;

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.