Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
warfollowmy_ver
Creator III
Creator III

Keeping the script text separate from the document and using it

There was an idea to keep the script text separately from the documents.
Why do I hope to explain it is not necessary ...

I can not yet understand how to execute the script obtained from an external source.
I am trying to do this through a subroutine, but I also don’t understand how to do it.

Who knows?

Labels (3)
1 Solution

Accepted Solutions
marcus_sommer

Then you do need to load it, maybe with something like:

script: load script from EXCEL where Condition = TRUE;

let script = peek('script', 0, 'script');

$(script)

This might be included in a sub-routine which might be included in a include-variable (I assume there are already multiple ones to define the standard-variables, paths, file-formattings, other routines and so on) so that you could use something like this to execute it:

call ExecuteScript(Path, Filename, Condition, WhatEver)

- Marcus

View solution in original post

4 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Use include or must_include:

In online help: Include

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
warfollowmy_ver
Creator III
Creator III
Author

That is 1 piece of script = one file .txt?

If I want to store scripts in excel or sql or somewhere other than .txt and in one file a few pieces of script?

marcus_sommer

Then you do need to load it, maybe with something like:

script: load script from EXCEL where Condition = TRUE;

let script = peek('script', 0, 'script');

$(script)

This might be included in a sub-routine which might be included in a include-variable (I assume there are already multiple ones to define the standard-variables, paths, file-formattings, other routines and so on) so that you could use something like this to execute it:

call ExecuteScript(Path, Filename, Condition, WhatEver)

- Marcus

warfollowmy_ver
Creator III
Creator III
Author

Thank!!! Yes it worked!
I just drew attention to the highlighting red color of the expression and thought that it would not work.

$(script)