
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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));


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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));

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oh, the horror! Countless hours I have spent trying to solve this myself.
It works now!
Thank you very much.
