Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Announcing the newest addition to the Qlik Community, Qlik Gallery! Learn More
sunil0584
New Contributor II

how to use must_include in qliksense

I m new to the qliksense please help me how to use must_include statement in qiksense

6 Replies
oknotsen
Honored Contributor III

Re: how to use must_include in qliksense

Here you go:

Include ‒ Qlik Sense

May you live in interesting times!
sunil0584
New Contributor II

Re: how to use must_include  in qliksense

oknotsen
Honored Contributor III

Re: how to use must_include in qliksense

If your question is now answered, please flag the Correct Answer (via the big "Correct Answer" button near every post; not visible in preview) and Helpful Answers (found under the Actions menu under every post).

If not, please make clear what part of this topic you still need help with .

May you live in interesting times!
sunil0584
New Contributor II

Re: how to use must_include  in qliksense

can you please help me with a example i am still not able to work with must_include

oknotsen
Honored Contributor III

Re: how to use must_include in qliksense

The help page I linked to has a simple example.

Start with building a piece of script with include. If your code works (and executes the script inside that file).

Once that works, replace include with must_include. The code should still work (but check).

Now remove the file your are trying to include and see that your script complains.

May you live in interesting times!
chris3669
New Contributor III

Re: how to use must_include  in qliksense

Must include in contrast to Include will yield an error if not possible to included (stopping the script if ErrorMode is default)

If you have a file named "to_be_included.qvs" in a folder mapped into your qliksense as "folder", and inside this file it has

  

LET this_variable = 2;

When you put this in your script

   

$(Must_Include=lib://folder/file to_be_included.qvs)

it will go to that file and run that line of code and make your variable "this_variable" equals 2

This is good when you have a piece of code or some variables you want to share between multiples scripts.