Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
jagannalla
Partner - Specialist III
Partner - Specialist III

Clear variables

Hi,

Is there any macro code to clear particular variables(i.

4 Replies
Miguel_Angel_Baeyens

Hi,

Can you please elaborate? Did you ceck the APIGuide.qvw file that is installed along with the documentation with the Full Install of QlikView Desktop? Did you check the SetContent member?

Set vVal = ActiveDocument.Variables("vVariable")

vVal.SetContent "", true

Do you want to completely remove the variable from the document? If so, did you check the APIGuide Application.RemoveVariable ?

Hope that helps.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

Not applicable

Hi,

you can use this:

sub cleanVariables

  Set VariableCollection = ActiveDocument.GetVariableDescriptions

  for i = 0 to VariableCollection.Count - 1

    set tempVar = VariableCollection.Item(i)

    tempVarName = tempVar.Name

    'if left(tempVarName,3) = "tot" then

     'msgbox "Deleting " & tempVarName

     ActiveDocument.RemoveVariable tempVarName

    'end if

  next

end sub

Hope that helps!

Andrea

jagannalla
Partner - Specialist III
Partner - Specialist III
Author

I'm using persona edition. I'm not able to open API quide.

Thanks for your help miguel.

Miguel_Angel_Baeyens

Hi,

APIGuide.qvw is installed if you choose the Complete Install and should be personal edition available. If that's not the case, let us know so the QlikTech stuff around can take a closer look.

Regards.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica