Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

jasonfreitas
New Contributor

Resident Table Persistence

I'm trying to figure out if resident tables persist in a QVW after saving, allowing for future executions to reference those tables. I always thought they did, but I just noticed a problem with an application that suggests they don't (or something has changed in the environment that is causing different behavior).

Here is an example of how I can recreate the error:

Create script:

Table1:

LOAD * Inline [

Field1

Value1

];

Reload and save QVW.

Reopen the QVW and note that Table1 exists with one row in the Table Viewer.

Alter the script (delete the old code) and replace with:

Table2:

LOAD

Field1 as Field2

Resident Table1;

Upon subsequent reload, error is:

Table not found

Table2:

LOAD

Field1 as Field2

Resident Table1

Is this normal behavior? In my actual application, I don't actually delete code, of course. The difference is that the equivalent Table1 is built in an IF construct. Subsequent reloads need to reference this table that was built in a prior execution.

1 Solution

Accepted Solutions
ramoncova06
Valued Contributor III

Re: Resident Table Persistence

5 Replies
awhitfield
Esteemed Contributor

Re: Resident Table Persistence

Resident refers to the table residing in memory with the context off the document, so once you've commented it out and reloaded it's gone!

Andy

jasonfreitas
New Contributor

Re: Resident Table Persistence

Ah, yes -- that makes sense. I guess I was hoping that there was a way to access the table in the saved QVW without having to reload it from the original source. When I open it up (after the first load), I see the table in the Table Viewer with a rowcount. Is there another way to load the table into memory? Should the NoOfRows function work on that table?

ramoncova06
Valued Contributor III

Re: Resident Table Persistence

you can if you do a binary load to the document itself

ramoncova06
Valued Contributor III

Re: Resident Table Persistence

MVP
MVP

Re: Resident Table Persistence

to make persistent data you can use

- .qvw and binary load (as Ramon already suggested);

- qvd (1 .qvd is one table in a file); search in Qlik help qvd 

Community Browser