Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

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,

1 Solution

Accepted Solutions

Re: looping issue

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;

2 Replies
marcus_malinow
Valued Contributor III

Re: looping issue

Hi Onur,

I'd comment out your ELSE clause and the

Load

MsgBox('SizeCheckOk') as Warning1;


Re: looping issue

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;

Community Browser