Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
benvatvandata
Partner - Creator II
Partner - Creator II

Partial Reload Variables Set in Script?

Hi,

I have a script that takes around 2 hours to fully reload, but all I want to test is a small section where various variables are being set... is there a way to do this, or do partial reloads only work for reloading table data?

Thanks,

Ben

1 Solution

Accepted Solutions
petter
Partner - Champion III
Partner - Champion III

Yes something like this:

IF IsPartialReload() THEN

   SET var1='ABC';

   LET var2 = 1+2;

ELSE // full reload

   .....

   .....

END IF

If you break down your load script into sub routines then you could have something like this:

IF IsPartialReload() THEN

   CALL Sub2    // called both for partial and full reload

   CALL Sub4

ELSE

   Call Sub1

   Call Sub2   // called both for partial and full reload

   Call Sub3

END IF

View solution in original post

5 Replies
petter
Partner - Champion III
Partner - Champion III

You can have control of what is being executed during a partial reload by using the logical system function IsPartialReload():

https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Scripting/SystemFunction...

So any assignment and evaluation of variables will be carried out for both normal full reloads as with partial reloads. You can use IF blocks with the IsPartialReload() to control what will be done during either of the types of reloads.

benvatvandata
Partner - Creator II
Partner - Creator II
Author

Ahh ok... so something like 'if IsPartialReload() then set variable1, etc.'?

And what would be the syntax to stop the partial reload at a certain point in time (End If)?

Thanks,

Ben

petter
Partner - Champion III
Partner - Champion III

Yes something like this:

IF IsPartialReload() THEN

   SET var1='ABC';

   LET var2 = 1+2;

ELSE // full reload

   .....

   .....

END IF

If you break down your load script into sub routines then you could have something like this:

IF IsPartialReload() THEN

   CALL Sub2    // called both for partial and full reload

   CALL Sub4

ELSE

   Call Sub1

   Call Sub2   // called both for partial and full reload

   Call Sub3

END IF

benvatvandata
Partner - Creator II
Partner - Creator II
Author

Great, thanks. I won't be able to test this out until later, but it seems pretty straightforward... I will let you know if I have any issues.

Thanks,

Ben

hoangvvo
Partner - Contributor III
Partner - Contributor III

Another note to add:

you can also just take the code and put it in the very begining

if ispartialreload() then

  set your variables

exit script;

end if

 

this will just exist after setting the variables, and will not do anything else. all table should retain as is.