Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How can i pass the scriptfile to the dynamically created new qvw file from the macro of an existing qvw file.

Hi All,

How can i pass the scriptfile to the dynamically created new qvw file from the macro of an existing qvw file.

Thanks.....

7 Replies
Not applicable
Author

Hello,

Why don't you use the keyword BINARY, in order to get your data model ?

Regards,

Amand

martin59
Specialist II
Specialist II

Hi,

With the binary command, you retrieve all your data model but not scripts.

If you wants scripts, you have to export it and use the include.

capture.png

Hope that helps you

Martin

Not applicable
Author

Hi Amand,

Thanks for your reply

I didn't get you.

Can you please explain me clearly with an example or attached qvw file.

Thanks...............

martin59
Specialist II
Specialist II

Amand was talking about the binary command. I'll try to explain you  this functionnality.

In a first hand, you must have a first application with datamodel.

In a second hand, create a second qvw application and load a QlikView File like this :

capture.png

After that, you should have this kind of command on the first line of your script :

Binary ;

Hope that helps you

Martin

Not applicable
Author

Hi Martin,

I am attaching sample file and the script file with this post.

Can you please help me how to pass the scriptfile to the dynamically created new qvw file from the macro of an existing qvw file.

I think you got my point...

Thanks....

Not applicable
Author

Thank you Martin for this explanation.

I would add that after the BINARY command, you can include others tables in your application or modify the tables of the first application.

Regards,

Amand

martin59
Specialist II
Specialist II

If I understand,

Your script must be something like that :

sub runDoc

    Set vPath=ActiveDocument.Variables("vNewPath")

    set lb=ActiveDocument

    vNew= "NewFile"&replace(Date(),"/","")&"_"&replace(Time(),":","")

    lb.SaveAs vPath.GetContent.String &"\"& vNew &".qvw"

end Sub

Hope that helps you