Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Avoid Overwrite of QVD

Hey everyone,

im actualy working on a freezing app for manual data added by the marketing team. Everything works fine the qvw does what is suppose to do.

The only thing i need to consider now is that if a file exist i dont want it to be overwritten by the app. Any idea's?

p.s If someone tries to overwrite a file a popup error on the up would be something appreciated

1 Solution

Accepted Solutions
Not applicable

Re: Avoid Overwrite of QVD

Hi,

Refer the script in this attachment.

And Run the Script through press Debug button for easy to analysis Script.

Regards,

Kabilan K.

5 Replies
Not applicable

Re: Avoid Overwrite of QVD

Hi,

U can write script like this.

Sub Checkfile(Filename,fileExist)

     Let fileExist=0

     for each file in fileList('$(Filename)')

          fileExist=1

     exit for

End Sub

Tbl1:

Load * form Sometable;

Let isYesorNo=0;

Call Checkfile('C:\\Tbl1.qvd',isYesorNo);

If(isYesorNo=0)

store Tbl1 into 'C:\\Tbl1.qvd"

end if

hope it helps u.

Regards,

Kabilan K.

Not applicable

Re: Avoid Overwrite of QVD

thnx for the anserw im gonna try to implement it and will let you know

Regards

Juan Pedro

Not applicable

Re: Avoid Overwrite of QVD

Hi,

Refer the script in this attachment.

And Run the Script through press Debug button for easy to analysis Script.

Regards,

Kabilan K.

Not applicable

Re: Avoid Overwrite of QVD

Is working more than fine thanks for the tip.

One more question is possible to costumize and force a script error adding an else here?

If(isYesorNo=0) then

store Tbl1 into D:\Tbl1.qvd;

ELSE

end if

Regards

Juan Pedro

Not applicable

Re: Avoid Overwrite of QVD

Looks like is not possible yet to costumize a script error message.

Thnks for your time

Regards

Juan Pedro

Community Browser