Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

using macro variable value clear

Hi All,

Using Macro how to clear multiple Variable values. Can anyone help me.

4 Replies
Frank_Hartmann
Master II
Master II

Try like this:

Function setVariable

set v=ActiveDocument.Variables("Variablename")

       v.Forcecontent "0",1

END function  

sasiparupudi1
Master III
Master III

sub reset_vars    '

    set doc=ActiveDocument

    set vars = doc.GetVariableDescriptions

    for i = 0 to vars.Count - 1

    set v = vars.Item(i)

  

'     v.SetContent "", true    'set variable to''
   ' doc.RemoveVariable v.Name   'delete variable entirely

 

    next

    set v = nothing

    set vars = nothing

    set doc = nothing

end sub

not tested.. but should work

Regards

Sasi

Not applicable
Author

Thanks for your reply Sasi,

My requirement is Multiple Variables i have.

For example :

I have three multi boxes  and  have three input boxes I want so like

Multiboxes : Multibox 1:, Multibox 2, Multibox 3

Input Box: input box1, input box 2, input box 3

When i give value in input box 1 = 10 show multibox 1, hide 2 and 3 multiboxes

and same as

input value is 20 show multibox2 and hide 3 and 1 multiboxes

and

input value is 11 show multibox3 and hide 1 and 2 multiboxes

Important things

i did using Conditional show , but properly not working.

See the attached file in above.

Can any one please help me as soon as possible. !

sasiparupudi1
Master III
Master III

Hi

Please see the attached document