Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
1) When do we use include files in qlikview?
2) What is the syntax for using includes in script
Syntax for both include and must include
3) what's the difference between include and must include. When to use what? Which one is prefered to be used?
Please start using community so you will get all basic stuff from help itself
The idea behind include files is to give you the ability to share a bit of code within multiple QVW files.
The syntax is as florentina.dogaru mentioned.
The difference between include and must include is that the include fails silently. What I mean by that is that if the file specified does not exists it will skip past that bit of code. The mus include will produce a hard fail if the file does not exist.
Good luck!
Oscar
Below is the Include text I use in Qlik Data Load Editor....The red dots before \include is folder directory up or down (forward or back).
// DATABASE CONNECTION
LET vInclude_Filename = '..\Includes\DBConnection.txt';
LET vInclude_Directory = '..\Includes\Variables.txt';
TRACE <LOG> Attempting to INCLUDE file [$(vInclude_Filename)];
IF IsNull (FileTime( vInclude_Filename )) THEN;
TRACE File doesnt exist [ $(vInclude_Filename) ];
EXIT SCRIPT ;
END IF;
$(must_include=$(vInclude_Filename));
TRACE ('[$(vInclude_Filename) ] file was found and incorporated into script');
$(must_include=$(vInclude_Directory));
and you'd need to place the attached document in Include Folder or any other folder you like but then accordingly you'd have to modify the destination in include script..
Same kind of text document would got for Data Base Connection. Where you store your connection string(s).
And I agree with Anil, most of the answers to your questions are already available in community. Just search it and you'll get it.