Qlik Community

Ask a Question

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Talk to Experts Tuesday, January 26th at 10AM EST: Qlik Sense. REGISTER NOW
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
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
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

Not applicable

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

It works now!

Thank you very much.