Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to retain the previously loaded data

Dear Experts,

Is there anyway to retain the the previously loaded data within qvw file, based on condition.

i.e., I have a variable, which indicates, whether the data has to be re-loaded or not. If the variable is set to "Yes" then all the data files has to be loaded. In case it is set to "No" then even if the user initiates the "Reload script" button, the Script should not run and it should retain the previously loaded data.

Thanks in advance.

Regards,

Karthik

4 Replies
Not applicable
Author

Hi Karthik

You can reload conditionally

If vReload = 'Yes' Then

.. reload statements

End If

You can also take a look into partial reload

Lukasz

alexandros17
Partner - Champion III
Partner - Champion III

use the

exit script[ (when | unless) condition ] syntax setting your condition at the start of the script

maxgro
MVP
MVP

hope it can helps you

  

at the script level I think you can only keep previous data forcing an error, in that way

let vexit = 1;

if vexit=1 then

  trace vexit 1;

  set ErrorMode=2;

  load * resident pippo;         // non existent table --> error --> data not overwritten

  trace 'after error';                  // never executed

ELSE

  set ErrorMode = ????;      // your default ErrorMode

  trace vexit 0;

ENDIF;

an other thing can help you

look at the menu: settings --> document properties --> security --> user privileges

and at section access in online help

Not applicable
Author

If you do a complete load, QV will erase previously loaded data

You must therefore do a Partial Reload

Use IspartialReload() boolean function to do or not some actions

Use the prefix ONLY to perform some tasks in case of partial reloads

REPLACE ONLY Load for tables you want to reset in case of partial reloads

Fabrice