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

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
markmccoid
Partner - Creator II
Partner - Creator II

Macro to list all Variable names

Not sure why I can't find this but I need to create a macro that will return all the variable names in a document.

Anybody know how to do this?

Thanks

Mark

1 Solution

Accepted Solutions
Anonymous
Not applicable

You should use this function GetVariableDescriptions in your macro. You can find it in the APIGuide.qvw

Example in the APIGuide.qvw :

rem ** Show name of all variables in document **
set vars = ActiveDocument.GetVariableDescriptions
for i = 0 to vars.Count - 1
set v = vars.Item(i)
msgbox(v.Name)
next

View solution in original post

2 Replies
Anonymous
Not applicable

You should use this function GetVariableDescriptions in your macro. You can find it in the APIGuide.qvw

Example in the APIGuide.qvw :

rem ** Show name of all variables in document **
set vars = ActiveDocument.GetVariableDescriptions
for i = 0 to vars.Count - 1
set v = vars.Item(i)
msgbox(v.Name)
next

markmccoid
Partner - Creator II
Partner - Creator II
Author

Sometimes I can look at that API app all day and not find what was starring me in the face!

Thanks!

Mark