Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Skip the ticket, Chat with Qlik Support instead for instant assistance.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Load scritpts function NoOfRow with variable as tablename

I'm trying to show the number of rows in a load script.  It works when I wirte directly the name of the table in the function noOfRows, but is does not if I use a variable (for every other purpose the variable works).

Here a sample

SET TABLE_NAME_03 = Monthly_Sales;

$(TABLE_NAME_03):
LOAD
*
 

FROM
$(TABLE_NAME_03)_2016.qvd
(
qvd)

let Rows_in_structure = NoOfRows($(TABLE_NAME_03)); => This line returns always NULL
let Rows_in_structure = NoOfRows('Monthly_Sales'); => This line returns the correct number of rows.

Does anybody knows how to use variable with the function NoOfRows?

Thank for your help

1 Solution

Accepted Solutions
its_anandrjs

Try this two ways for this

1. let Rows_in_structure = NoOfRows(TABLE_NAME_03);  //Without bracket and comma

2. let Rows_in_structure = NoOfRows('$(TABLE_NAME_03)'); //With comma

Regards

Anand

View solution in original post

4 Replies
sunny_talwar

May be try single quotes around your variable:

LET Rows_in_structure = NoOfRows('$(TABLE_NAME_03)');

its_anandrjs

Try this two ways for this

1. let Rows_in_structure = NoOfRows(TABLE_NAME_03);  //Without bracket and comma

2. let Rows_in_structure = NoOfRows('$(TABLE_NAME_03)'); //With comma

Regards

Anand

Not applicable
Author

Hi, both versions (with comma) and (without comma and brakets) works.

sunny_talwar

I provided one of those options, you seemed to not like my response .

Just kidding, I am glad we were able to help you out here