Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Variable to condition file table selection

Hi All,

I have an application that needs to condition which table(s) to load based on the content of a control table.

I loaded the control table and set a variable true/false.

If the variable is true, TABLEA is loaded.

If the variable is false, TABLEB is loaded and TABLEC is left joined to TABLEB.

The syntax escapes me. Can someone please point me in the right direction?

Thanks,

Rich

2 Replies
Not applicable
Author

numeric value of True is -1, False is 0. You may check for these in an IF and LOAD A or B.

Not applicable
Author

Thanks, for your reply Jasleen,

I found the syntax I was looking for;

IF '$(vEPDM)' = 1 then
Item:
Load  ITNBR;
SQL Select ITNBR
FROM S10AE37C.AMFLIB7.ITEMASA;

Elseif '$(vEPDM)' = 0 then
Item:
TEMPB:
Load ITNBR;
SQL Select ITNBR
FROM S10AE37C.AMFLIB7.ITMRVA;

Endif