Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Include statement script issue

I am trying to include a script in my QVW during the run using a variable path.  The problem I am running into is this: if I include the script outside of a subroutine, the include statement gets parsed before the variables have been initialized and it fails; on the other hand, if I put the include statement in a subroutine it appears to include successfully but when a call to a method from the included script tries to execute, it fails.

These are the two statements:

   $(Include=$(Config_Root)\myScript.qvs)

    $(Include=..\Data\Config\myScript.qvs);

The interesting thing is that neither of these statements works if they are wrapped by a subroutine...  Does anyone know if there is a different syntax for calling methods that have been included within a subroutine during the run?

Thanks in advance!

--Ben

1 Reply
Not applicable
Author

For clarification -

This works:

...

$(Include=..\Data\Config\myScript.qvs);

...

This does not:

...

sub blah

$(Include=..\Data\Config\myScript.qvs);

end sub

...

I was able to get the variable path to work outside of a subroutine after all using the method from http://community.qlik.com/message/204806#204806

I am still interested to know if anyone has a means of doing the same thing from within a sub (second example above).