Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
bdiamante
Contributor III
Contributor III

Partial Reload not running SET statements

So there's a fair amount of these questions out there already with no answers, but figured maybe it's worth asking again...

I have a script that works like the following basic example:

Section Application;

if not IsPartialReload() then

//All my loads and joins can concatenates, etc.

//None of these need to be replaced/added during a partial reload.

end if;

//A bunch of set statements

set _var1 = 0;

set _var2 = 0;

set _var3 = 1;

set _var4 = 1;


The problem is that when I execute a partial reload, even though all the documentation I can find suggests that SET/LET statements are run, they are not being run. The variable values are never updated in the application upon completion of the partial reload.

What am I missing?

11 Replies
sunny_talwar

I would expect them to update. I am going to test now and get back

Seems to be working in the attached file. Would you be able to share a sample where you believe it isn't working?

Chanty4u
MVP
MVP

can u ry giving single quotes to variables and try?

  1. set _var1 = '0'
  2. set _var2 = '0'
  3. set _var3 = '1'
  4. set _var4 = '1';
bdiamante
Contributor III
Contributor III
Author

Thanks for the quick response. This is strange. The example definitely works. Which leads me to believe there is something between my "if" and "end if" that is breaking it somehow. I'm testing a couple of things and will report back. The script is rather long and not sure how much of it I can actually post.

sunny_talwar

Not sure if it matters, but can you try ENDIF; without any space?

bdiamante
Contributor III
Contributor III
Author

Tried with quotes, and the endif without the space. Neither seemed to have an impact.

However, I removed the ";" after "end if" altogether and that fixed it. Any ideas on why that would have broken things?

Thanks for your help!

sunny_talwar

I have no idea, this is strange, but it is working for you, right?

Chanty4u
MVP
MVP

try this

if IsPartialReload() then

//drop Table TABNAME;

ENDIF

bdiamante
Contributor III
Contributor III
Author

I'll make that change. Thanks! One last thing, I understand the difference between SET and LET statements, but what is the difference when declaring a variable without a SET or LET like:

_var = 1;

Chanty4u
MVP
MVP

HI

You can write load script so that the variables are only set when there is a full reload:

IF IsPartialReload() = 0 THEN //If it is NOT a partial reload

    set Variable = whatever;

ENDIF