Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Share your agentic AI experience, learn from others, and earn a new badge: Put Agentic AI to Work
cancel
Showing results for 
Search instead for 
Did you mean: 
Chotana2
Partner - Contributor III
Partner - Contributor III

Error in load script, Qlik Sense don't find my table : store [] into ...

Hi Community, 

 

I have a problem I can't solve:

I try to store my tables with a loop (sorry, copy/paste of text doesn't work with my remote server)

For the debug purpose, I have a first loop that list all the tables of the datamodel

Chotana2_0-1782838253619.png

 

and I get 25 tables in output

Chotana2_1-1782838327215.png

...

Chotana2_2-1782838354156.png

 

 

but in the store loop, it stores 13 tables, and for the 14th, I get this 

Chotana2_3-1782838428573.png

And I don't know which one is failing since it doesn't store in the same order than the debug loop

I don't understand why, could you help me ?

There is no mapping table

 

Labels (3)
1 Solution

Accepted Solutions
marksouzacosta
MVP
MVP

Hi @Chotana2 

The problem is that you are dropping the tables so, the quantity of tables available is reducing - affecting your index. Your For Index Loop is expecting X number of tables in memory but you are removing the tables fro memory on every loop, that is why the table not found error.

Do a reverse approache:

FOR vTableNo = NoOfTables() - 1 TO 0 STEP -1
    LET vTableName = TableName($(vTableNo));
    DROP TABLE [$(vTableName)];
NEXT vTableNo

 

Regards,

Mark Costa

Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com

View solution in original post

4 Replies
andrzejdobiegal
Partner - Contributor II
Partner - Contributor II

try it this way

andrzejdobiegal_1-1782849784720.png

 

marksouzacosta
MVP
MVP

Hi @Chotana2 

The problem is that you are dropping the tables so, the quantity of tables available is reducing - affecting your index. Your For Index Loop is expecting X number of tables in memory but you are removing the tables fro memory on every loop, that is why the table not found error.

Do a reverse approache:

FOR vTableNo = NoOfTables() - 1 TO 0 STEP -1
    LET vTableName = TableName($(vTableNo));
    DROP TABLE [$(vTableName)];
NEXT vTableNo

 

Regards,

Mark Costa

Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com

Chotana2
Partner - Contributor III
Partner - Contributor III
Author

Hello @marksouzacosta 

I slept on it and I had a light up during the night and I think indeed this is the problem.

I'll try to keep the loop to store, and add a nex loop to drop.

Chotana2
Partner - Contributor III
Partner - Contributor III
Author

@marksouzacosta that was the issue. 

It's working fine now

Thanks for your reply