Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

script meaning

Hi All,

What is this script means, how it works?

IF vTable = 'ALL' OR vTable = 'TableA' THEN

[TableA]:

LOAD *

FROM

[$(QVDPath)A.qvd]

(qvd);

store [TableA] into [$(QVDPath)TableA.qvd] (qvd);

drop table [TableA];

[TableB]:

LOAD *

FROM

[$(QVDPath)B.qvd]

(qvd);

store [TableB] into [$(QVDPath)TableB.qvd] (qvd);

drop table [TableB];

[TableC]:

LOAD *

FROM

[$(QVDPath)C.qvd]

(qvd);

store [TableC] into [$(QVDPath)TableC.qvd] (qvd);

drop table [TableC];

[TableD]:

LOAD *

FROM

[$(QVDPath)D.qvd]

(qvd);

store [TableD] into [$(QVDPath)TableD.qvd] (qvd);

drop table [TableD];

ENDIF

6 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Are you asking what does the IF/ENDIF statement does? The script between these statements will only execute of the IF condition evaluates to true - in other words, if the variable vTable is set to to 'ALL' to 'TableA'

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Yes Jonathan, My doubt is how to set these conditions? How to execute them? I am quite new for this concept. Could you please explain in details?

vcanale
Partner - Creator II
Partner - Creator II

Hi,
The Load of the tables [TableA], [TableB], [TableC]. [TableD] will happen only if vTable = 'ALL' OR vTable = 'TableA'

jyothish8807
Master II
Master II

Hi Annio,

Over here vTable is a variable and it can have only one value at a time. A per your code,

If the variable “vTable” contains value either 'ALL' OR 'TableA' then it will meet the condition and load all the tables mentioned below.

Regards

KC

Best Regards,
KC
wallerjc
Partner - Contributor III
Partner - Contributor III

Hi

If your variable "vTable" is set to "ALL" or "TableA" doesn't seem to matter here, it will still load TableA and TableB

You might need to show us more code to help you out further.

Thanks,

james.

rupamjyotidas
Specialist
Specialist

You need to find out where in your script the values of 'vTable'  is set. Probably in your script or in Publisher