Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

close document

Hello,

How can I enforce closing document in the load script.

For example:

If (1=1)

     CloseDocument;

End If

There is a way? Even calling some macro function/sub or something...

Thanks in advance,

Itsik

1 Solution

Accepted Solutions
Not applicable
Author

If you want to close the document after the script finish.

You can use Document triggers.

Settings -> Document properties -> Tab triggers ->  Add actions for 'OnPostReload' - > Add

-> External -> Close this document

View solution in original post

4 Replies
Not applicable
Author

If you want to close the document after the script finish.

You can use Document triggers.

Settings -> Document properties -> Tab triggers ->  Add actions for 'OnPostReload' - > Add

-> External -> Close this document

jagan
Luminary Alumni
Luminary Alumni


Hi,

If you want to stop executing the script then you can try

Exit Script;

Regards,

Jagan.

Not applicable
Author

Hi,

I want to run some script untill some point - where the if statement located and then if the if retun true I want to close the all dcument, not only stop the script...

Thanks,

Itsik

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

The only way I know is to create an error which will terminate the load and close the document (effectively reverting to the version before the reload started). Set ErrorMode to 2 if you want to use this in a batch load.

If you batch reload the document, then it will automatically close when the script completes, so Exit Script will end the script and the document will close.

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein