Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
MVP
MVP

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;
Highlighted
Specialist
Specialist

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?