Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Welcome to Qlik Community! Check out our new navigation! FIND OUT MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
jeckstein
Partner - Creator
Partner - Creator

IF table do not exist then Exit Script

I currently have the following code. Which says if a table does not exist then exit script.

if isnull(TableNumber('Temptable'))

then

Exit Script

End IF

I need to change this to look at two tables Temptable and Temptable1.

Basically I want to exit the script if Temptable and Temptable1 do not exist.


This maybe simple but I am stuck.


Thanks in advance!!!!

3 Replies
YoussefBelloum
Champion
Champion

Hi,

never tried such thing, but if above script is already working, you can try this:

if isnull(TableNumber('Temptable')) and isnull(TableNumber('Temptable1'))

then

Exit Script

End IF

Wlad_Masi
Employee
Employee

Hi James,

You can use the following script:
In this example table Temptable7 and Temptable8 are being loaded but Temptable2 not.
If you change the name of table Temptable7 and Temptable8 to Temptable and Temptable1, the entire script will be executed.

Temptable7:

load * inline[

test,name

test,n1

test2,n2

];

Temptable8:

load * inline[

c,b

1,2

3,4

];

if isnull(TableNumber('Temptable')) and (isnull(TableNumber('Temptable1'))) then; Exit Script; end if;

Temptable2:

load * inline[

t,n

t1,name1

t2,name2

];

To help users find verified answers, please don't forget to mark a correct resolution or answer to your problem or question as correct.
qlik_ashok
Contributor III
Contributor III

Hello James,

If isnull(TableNumber('Temptable'))  then

if isnull(TableNumber('Temptable1')) then

Exit Script

End IF

hope it will works for you.