Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Can load scripts be programatically changed?

We have a large number of QVW's in which the load scripts have a similar format. I need to make the same search-and-replace changes to the code across all the QVW's. Is there a way to automate this change, so I don't have to manually open up each QVW and change the load script?

We are using QlikView Desktop version 9.

Joseph Lin, Senior Software Development Engineer

.

Terra Technology  |  Accurate. Current. Consistent.

6 Replies
Not applicable
Author

Hi,

1 solution is writing script in text file then include it into qvw with

$(include = filename )

So when u have to find something, u can search any string in folder with all script.

C u,

Stefano.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

It's possible with a bit of code. Please PM with your email and we can discuss.

-Rob

http://robwunderlich.com

Not applicable
Author

Thanks, Stefano. I wasn't aware of that interesting technique.

Unfortunately these QVW's already exist. Also, the code is in the hidden script. I'm sure there are ways to break into the hidden script, but we just want to make sure our code isn't obviously visible.

Joseph Lin, Senior Software Development Engineer

.

Terra Technology  |  Accurate. Current. Consistent.

Not applicable
Author

The following thread shows a technique to change scripts:

http://community.qlik.com/message/3825#3825

I haven't verified if it works. And unfortunately it doesn't work with hidden scripts.

Joseph Lin, Senior Software Development Engineer

.

Terra Technology  |  Accurate. Current. Consistent.

Not applicable
Author

Dollar sign expansions in the load scripts are essentially programatic copy-paste functions. You can use $(name) to replace any part of the script. Try something like this where the table load string is assigned to a variable and is later executed with dollar sign expansion:

LET script='QUALIFY *' & chr(59) & '

table1:

LOAD * Inline [

Company,      Project,     Invoice Number,     Amount

Company x,

         ,    project b,   

         ,             ,   111111,             1.00

         ,             ,   222222,             2.00

Company y,

         ,    project c,

         ,             ,   333333,             3.00

]' & chr(59);

$(script);

Not applicable
Author

vhuynh, that's another interesting use of the dollar sign expansions.

But again it doesn't help with existing QVW files.