Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

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

Re: Can load scripts be programatically changed?

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.

Can load scripts be programatically changed?

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

-Rob

http://robwunderlich.com

Not applicable

Re: Can load scripts be programatically changed?

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

Can load scripts be programatically changed?

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

Re: Can load scripts be programatically changed?

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

Re: Can load scripts be programatically changed?

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

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

Community Browser