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: 
jduenyas
Specialist
Specialist

Copy variable

Hello gurus

I have created a new document with a Binary load from an existing one.

However, variables are not being copied/transferred with the Binary load.

Is there a way to copy all variables (i have many of them) from the existing document to the new?

 

Thanks

11 Replies
petter
Partner - Champion III
Partner - Champion III

Yes - and if you read the link that Rob suggested you will find code to do exactly that.

Quoting from his post it will look like this:

FOR idx=0 to NoOfRows('VARIABLE')-1
 LET vVarname = Peek('Name',$(idx),'VARIABLE');
 LET [$(vVarname)] = Peek('RawValue',$(idx),'VARIABLE');
NEXT idx

SET idx=;
SET vVarname=;
DROP Table VARIABLE;
jduenyas
Specialist
Specialist
Author

In any of the sheets type

<Ctrl><Alt> v this will open a dialog box to create variables. Click Add, name your variable and then enter the formula/reference/fields that you would like to use in a variable name.

Did this help?