Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

siddharth_kulka
Contributor

Delete a variable on OPEN

Requirement: Delete a variable for a particular file type, but the variable should stay for the rest.

Hi ,

Has any one attempted to delete a variable on document open.

I couldn't find a macro event/property to achieve the same

Any suggestions will be appreciated.

Regards,

Siddharth

Tags (3)
2 Replies
deepakk
Valued Contributor III

Delete a variable on OPEN

HI Siddharth,

Cant we initializes the variable to zero or null(). That would be much easier task.

MVP
MVP

Delete a variable on OPEN

Hello,

Try with the following macro

Sub CleanUp ActiveDocument.RemoveVariable "vVar"End Sub


the variable will be deleted completely from your script, as if you go to Settings menu, Variable Overview and delete it.

Besides, opening on server (via ajax, plugin) is likely not to trigger OnOpen and OnPostReload macros properly. In this case, you should create a different event.

Hope that helps

Community Browser