Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Get the name of most recently loaded table in script

Hi,

in my qlikview load i want to store the name of the most recently loaded table into a variable.

Say in my load script i write:

________________________________________________________________

load *

from table1;

load *

from table2;

load * from

table3;

Let vL.test1 = NoOfTables();

Let vL.test2 = TableName(vL.test1);

Trace($(vL.test2));

_________________________________________________________________

The trace statement shows no output whereas if I write Trace($(vL.Test1)); I get the number '3' as I would expect. Can anyone tell me how to use a variable as input to the TableName() function?

1 Solution

Accepted Solutions
swuehl
MVP
MVP

I believe the TableName() index runs from zero to NoOfTable -1, so you need to use

Let vL.test1 = NoOfTables();

Let vL.test2 = TableName( vL.test1 -1);

Trace($(vL.test2));

View solution in original post

2 Replies
swuehl
MVP
MVP

I believe the TableName() index runs from zero to NoOfTable -1, so you need to use

Let vL.test1 = NoOfTables();

Let vL.test2 = TableName( vL.test1 -1);

Trace($(vL.test2));

Not applicable
Author

Oh, the horror! Countless hours I have spent trying to solve this myself.

It works now!

Thank you very much.